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

           Summary: __traits compiles/ is(typeof) don't work for invalid
                    type casts.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: timon.g...@gmx.ch


--- Comment #0 from timon.g...@gmx.ch 2012-02-09 09:55:47 PST ---
DMD 2.057 and 2.058head

void main(){
    class X{} X    x;
    static assert(!__traits(compiles, cast(int)x));// assertion failure
    int y = cast(int)x;                            // compile error
}

Apparently casts are checked for validity too late.

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

Reply via email to