[Issue 2196] Link errors with an abstract class's method implementing an interface
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jul 6 03:09:55 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2196
------- Comment #1 from 2korden at gmail.com 2008-07-06 05:09 -------
I'm not sure if it is a bug, this is a correct behaviour to me.
In this code:
abstract class B : A {
void foo ();
}
you define a method foo() and should provide a function body somewhere. Merely
marking class abstract says that you can't instantiate it, but you can any
other class that subclasses from it, unless it is abstract, too. If you mark
you method as abstract it means that there is no body, child class should
provide an implementation.
Interface methods are implicitly abstract.
--
More information about the Digitalmars-d-bugs
mailing list