[Issue 3396] Call of abstract method not detected by semantic check
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jul 18 10:57:42 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=3396
Stewart Gordon <smjg at iname.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #4 from Stewart Gordon <smjg at iname.com> ---
(In reply to Denis Shelomovskij from comment #3)
> This is a documented and intended behavior. According to [1]:
>> Functions declared as abstract can still have function bodies.
But A.M has no function body. So what's the relevance?
>> This is so that even though they must be overridden, they can
>> still provide ‘base class functionality.’
But no base class functionality has been provided. As such, the compiler
cannot resolve the call to super.M and therefore should error.
> It also maches C++ behavior with respect to pure virtual functions.
What exactly does the C++ standard say about this?
That said, is C++ behaviour relevant? D is not C++.
--
More information about the Digitalmars-d-bugs
mailing list