[Issue 3448] New: __traits(compiles) returns true for a non-compilable template instantiation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 29 04:48:14 PDT 2009


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

           Summary: __traits(compiles) returns true for a non-compilable
                    template instantiation
           Product: D
           Version: 2.035
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: samukha at voliacable.com


--- Comment #0 from Max Samukha <samukha at voliacable.com> 2009-10-29 04:48:13 PDT ---
template Bar()
{
    void Bar()
    {
        error;
    }
}

template Foo()
{
    enum Foo = __traits(compiles, Bar!());
}

static assert(!Foo!());

-- 
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