[Bug 79] New: Assertion failure: mtype.c 364 - using a forward-referenced alias of an undefined type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 1 14:03:51 PST 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=79

           Summary: Assertion failure: mtype.c 364 - using a forward-
                    referenced alias of an undefined type
           Product: D
           Version: 0.150
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: smjg at iname.com


If I forward-reference a type that is an alias of an undefined symbol, DMD
crashes out.

----------
enum : LCTYPE {
    LOCALE_ILANGUAGE,
}

alias DWORD LCTYPE;
----------
D:\My Documents\Programming\D\Tests\bugs\winnls.d(1): identifier 'DWORD' is not
defined
Assertion failure: 't' on line 364 in file 'mtype.c'
----------

after which DMD hangs.

It appears to affect all uses of such an alias as a type, as long as the use
precedes the alias declaration:
- declaring a variable or constant, whether at module, function or class/struct
level
- declaring a typedef
- declaring an alias of the derived pointer or array type
- using as a function return type
- using as a function parameter


-- 




More information about the Digitalmars-d-bugs mailing list