[Issue 2015] New: Virtual template methods are allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 19 11:53:39 PDT 2008


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

           Summary: Virtual template methods are allowed
           Product: D
           Version: 1.028
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: dvdfrdmn at users.sf.net


Compiler allows the following:

--
class X
{
    void f(T)() { }
}
void main() { (new X).f!(int)(); }
--

This is due (at least partially) to the use of toParent() instead of
toParent2() to in FuncDeclaration::semantic, FuncDeclaration::isVirtual, and
Dsymbol::isMember.


-- 



More information about the Digitalmars-d-bugs mailing list