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

--- Comment #0 from 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:
------- You are receiving this mail because: -------

Reply via email to