[Issue 2894] abstract classes sometimes allow non-abstract bodyless functions

2014-04-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2894

Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

Version|1.043   |D1

--


[Issue 2894] abstract classes sometimes allow non-abstract bodyless functions

2012-01-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2894



--- Comment #2 from github-bugzi...@puremagic.com 2012-01-23 00:48:15 PST ---
Commit pushed to
https://github.com/D-Programming-Language/d-programming-language.org

https://github.com/D-Programming-Language/d-programming-language.org/commit/341a8f7233d74c9313625290eff8af57af3c2d2a
fix Issue 2894 - abstract classes sometimes allow non-abstract bodyless
functions

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


[Issue 2894] abstract classes sometimes allow non-abstract bodyless functions

2012-01-23 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2894


Walter Bright bugzi...@digitalmars.com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


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


[Issue 2894] abstract classes sometimes allow non-abstract bodyless functions

2009-04-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2894


s...@iname.com changed:

   What|Removed |Added

 CC||s...@iname.com
   Keywords|wrong-code  |link-failure, spec




--- Comment #1 from s...@iname.com  2009-04-25 08:36 ---
That the first example links is understandable - because C.foo is never used,
the compiler doesn't create any references to it.

That the second example fails is semi-understandable - presumably the compiler
creates a vtbl for C's implementation of I, but the linker cannot resolve it
because no implementation of C.foo() has been linked in.  However, it does seem
that DMD could be better at DCE.

Less understandable is that this fails with the same error:
--
abstract class C { void foo(); }
class D : C {}
void main() { }
--

It was my understanding as well that a function in an abstract class is
automatically abstract if no body is given.  But it appears now that it's the
same as in a non-abstract - if the function isn't declared abstract, it
references an externally-defined function.  Still, the spec probably needs to
be clearer on the issue.


--