[Issue 8599] Link time error when class's method are defined without body and nothing is abstract

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 29 14:00:36 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8599


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jmdavisProg at gmx.com
         Resolution|                            |INVALID


--- Comment #1 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-08-29 14:00:34 PDT ---
abstract is never inferred. Why would it be inferred? Functions are only
abstract if marked abstract.

And if a function is not abstract, then it needs a body/definition, so obviousy
it's going to fail at link time when the linker doesn't find a definition for
it. It's perfectly legal to declare a function without giving its body as long
as the linker has the body. That's how .di files work. It's also useful with
stuff like version(D_Ddoc) where there is no definition and shouldn't be one.

This isn't a bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list