Bug 2261 – Assertion failure: '0' on line 122 in file 'statement.c'

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2008-08-01T07:06:00Z
Last change time
2014-03-01T00:37:04Z
Keywords
EH
Assigned to
bugzilla
Creator
joel.bjorkman

Comments

Comment #0 by joel.bjorkman — 2008-08-01T07:06:25Z
The DMD compiler crashes when I compile the code below (using DMD v1.033, Windows XP). The compiler do identify the first error: main.d(8): Error: foreach: void is not an aggregate type but then I get an assertion failure: Assertion failure: '0' on line 122 in file 'statement.c' This is perhaps a strange error and I don't know if anyone else have seen it. I do get the error even though I don't use the -debug flag. The error doesn't occur if I remove the "debug Object foo"-line. module main; public void bar() { } void main() { foreach(Object o ; bar()){ debug Object foo = null; //error } } regards Joel
Comment #1 by 2korden — 2008-08-01T08:44:10Z
*** This bug has been marked as a duplicate of 2259 ***