[Issue 1408] New: Assertion failure: 'd' on line 4234 in file 'mtype.c' on faulty d code
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 9 14:33:57 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1408
Summary: Assertion failure: 'd' on line 4234 in file 'mtype.c' on
faulty d code
Product: D
Version: 1.020
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: sky at quit-clan.de
The compiler crashes when i try to compile the following faulty d code:
-------
struct ABC()
{
alias NonExistentTemplate!() y;
}
void main()
{
auto abc = new ABC!();
foreach (x; abc.y) {} // Required for the compiler to crash
}
-------
The output of the compiler is:
-------
ass4234.d(3): template instance identifier 'NonExistentTemplate' is not defined
ass4234.d(8): template instance ass4234.ABC!() error instantiating
Assertion failure: 'd' on line 4234 in file 'mtype.c'
abnormal program termination
-------
It does, however, not crash if you don't use a template in the template ABC or
if you comment out the foreach loop. This bug is uncritical for development
because the compiler actually shows all the errors before crashing...
--
More information about the Digitalmars-d-bugs
mailing list