digitalmars.D.bugs - [Issue 1289] New: Class method without a function body should be abstract?
- d-bugmail puremagic.com (20/20) Jun 24 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1289
- d-bugmail puremagic.com (11/11) Jun 28 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1289
http://d.puremagic.com/issues/show_bug.cgi?id=1289 Summary: Class method without a function body should be abstract? Product: D Version: 1.016 Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: onlystupidspamhere yahoo.se The spec should state whether a method without a body is abstract or not. Of course this also affects the behavior of compiler. For instance this fails when linking: class A { A f(); } class B : A { B f() { return this; } } void main() { B a = new B(); } In some occasions similar code works, in others it doesn't. --
Jun 24 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1289 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #1 from bugzilla digitalmars.com 2007-06-28 15:13 ------- This is working as designed. It allows one to implement a member function elsewhere than the class definition. To have an abstract class, it must have the 'abstract' storage class. --
Jun 28 2007