www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3616] New: __traits(compiles) returns true for uncompilable code due to static assert

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

           Summary: __traits(compiles) returns true for uncompilable code
                    due to static assert
           Product: D
           Version: 2.036
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: lutger.blijdestijn gmail.com


--- Comment #0 from Lutger <lutger.blijdestijn gmail.com> 2009-12-14 10:51:43
PST ---
void foo()
{
    static assert(false);
}

void main()
{
    static assert( __traits(compiles, foo()) == false );
}

The assert fails, but should not. Looks similar to bug 3448.

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