Bug 1159 – Various mixins cause "CompileExp::semantic" message, some crash DMD

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
All
Creation time
2007-04-17T12:58:00Z
Last change time
2014-02-16T15:23:03Z
Keywords
diagnostic, ice-on-invalid-code
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla
Blocks
1146

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2007-04-17T12:58:53Z
Some invalid mixins causing compiler crashes, in addition to the message "CompileExp::semantic('mixin(2)')\n2": -- void main() { cast(void)mixin(2); } -- void main() { "" ~ mixin(2).stringof; } -- char[] s = mixin(2).stringof; -- auto i = mixin(2); -- These result in only the message (and the expected errors), no crash: -- void main() { "" ~ mixin(2); } -- char[] s = mixin(2); -- int i = mixin(2); -- This one also results in the message and, strangely enough, compiles successfully (the statement is completely ignored): void main() { cast(void)mixin("2"); } Setting Bug 1146 to depend on this, although it's probably just another instance of the same bug, and could be set as being a duplicate.
Comment #1 by matti.niemenmaa+dbugzilla — 2007-04-21T10:43:41Z
The message has been removed in 1.013, but the first four still crash the compiler.
Comment #2 by thomas-dloop — 2007-04-23T12:54:48Z
Comment #3 by bugzilla — 2007-04-27T14:58:05Z
Fixed DMD 1.014