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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2259 - Assertion failure: '0' on line 122 in file 'statement.c'
Summary: Assertion failure: '0' on line 122 in file 'statement.c'
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords: EH
: 2261 (view as issue list)
Depends on:
Blocks:
Reported: 2008年08月01日 02:11 UTC by Joel Björkman
Modified: 2014年03月01日 00:36 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Joel Björkman 2008年08月01日 02:11:06 UTC
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 Koroskin Denis 2008年08月01日 08:44:10 UTC
*** Bug 2261 has been marked as a duplicate of this bug. ***
Comment 2 Walter Bright 2008年08月14日 03:03:03 UTC
Fixed dmd 1.034 and 2.018


AltStyle によって変換されたページ (->オリジナル) /