www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11624] New: __trait(compiles) does not detect unimplemented interface

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

           Summary: __trait(compiles) does not detect unimplemented
                    interface
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: luis luismarques.eu



---
This does not compile, of course:

    interface I
    {
        void foo();
    }

    static class C : I { }

Yet this static assert succeeds:

    interface I
    {
        void foo();
    }

    static assert(__traits(compiles,
    {
        static class C : I { }
    }));

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