[Issue 1918] __traits(getVirtualFunctions) returns final functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 23 07:36:25 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=1918



--- Comment #9 from yebblies <yebblies at gmail.com> 2012-01-24 02:36:20 EST ---
(In reply to comment #6)
> Why would it be useful to have a non-virtual function listed as a virtual
> function? Because that's what you're doing when mark a function which doesn't
> override anything final. It's _not_ in any kind of override chain.

Well, you make some good points.  I'm not entirely convinced there isn't some
template forwardingy application (are there any uses for
__traits(getVirtualFunctions)?) that would find the other way useful.

Anyway, I'm not sure this fix is correct.  After a little bit of poking around
I discovered that a final method that doesn't override anything IS STILL
VIRTUAL.  It still creates a vtable slot.  Is this a bug?  From what I can tell
that means there is no way to actually create a non-virtual non-static member
function.  If final functions that do not override anything were implicitly
non-virtual, it would fix this bug.

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


More information about the Digitalmars-d-bugs mailing list