Summary: casting to undefined types crash dmd
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Stephan Dilly <> 2010-10-01 00:27:41 PDT 
int main(string[] argv)
    auto crash = cast(Foo*)&_addr;

    return 0;

yes both Foo and _addr are undefined and dmd issues errors for that but then it
sill crashes with an assert:

main.d(22): Error: identifier 'Foo' is not defined
main.d(22): Error: Foo is used as a type
Assertion failure: 'tn->mod & MODimmutable || tn->mod & MODconst' on line 875
in file 'mtype.c'

Tested on windows using dmd2.049

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to