[Issue 6118] New: nested overloaded foreach in contract crashes dmd
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 6 17:39:22 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6118
Summary: nested overloaded foreach in contract crashes dmd
Product: D
Version: D2
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: viritrilbia+d at gmail.com
--- Comment #0 from Mike Shulman <viritrilbia+d at gmail.com> 2011-06-06 17:34:52 PDT ---
The following code crashes DMD v2.053 with "Internal error: ../ztc/cgcs.c 363":
class foo {
int opApply(int delegate(ref int) dg) const { return 0; }
foo bar()
out(result) {
foreach (x ; result)
foreach (y ; result)
assert(x);
}
body { return this; }
}
I haven't been able to simplify the code any further and still reproduce the
crash. Removing the second foreach makes it compile, as does replacing
"assert(x)" with anything not referring to "x".
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list