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

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1159 - Various mixins cause "CompileExp::semantic" message, some crash DMD
Summary: Various mixins cause "CompileExp::semantic" message, some crash DMD
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 All
: P2 major
Assignee: Walter Bright
URL:
Keywords: diagnostic, ice-on-invalid-code
Depends on:
Blocks: 1146
Show dependency tree / graph
Reported: 2007年04月17日 12:58 UTC by Matti Niemenmaa
Modified: 2014年02月16日 15:23 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 Matti Niemenmaa 2007年04月17日 12:58:53 UTC
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 Matti Niemenmaa 2007年04月21日 10:43:41 UTC
The message has been removed in 1.013, but the first four still crash the compiler.
Comment 3 Walter Bright 2007年04月27日 14:58:05 UTC
Fixed DMD 1.014


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