[Issue 11616] Introduce virtual keyword and remove virtual-by-default

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 26 05:10:11 PST 2014


https://d.puremagic.com/issues/show_bug.cgi?id=11616



--- Comment #11 from yebblies <yebblies at gmail.com> 2014-02-27 00:10:00 EST ---
(In reply to comment #10)
> (In reply to comment #9)
> 
> > An oversight, it should give you an error the same as `@safe @system void
> > fun();`  does.  Please file a bug for it.
> 
> Yet it seems C++11 allows it:
> 
> http://en.wikipedia.org/wiki/C%2B%2B0x#Explicit_overrides_and_final
> 
> http://stackoverflow.com/questions/6788338/final-virtual-functions-in-c0x
> 
> http://stackoverflow.com/questions/11704406/whats-the-point-of-a-final-virtual-function

Interesting...  Still, because we have attribute scopes/labels that would be
harmful in D.

eg

virtual:
final:
    void fun();

Here fun should be final, not both virtual and final.  This should behave the
same way as "virtual final".

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


More information about the Digitalmars-d-bugs mailing list