D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4390 - ICE(expression.c): Invalid string mixin
Summary: ICE(expression.c): Invalid string mixin
Status: RESOLVED DUPLICATE of issue 4389
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-06-25 02:10 UTC by yebblies
Modified: 2010-11-23 00:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description yebblies 2010-06-25 02:10:09 UTC
The following code on dmd2.047 causes the error:

"Assertion failure: 'se->sz == 1' on line 3005 in file 'expression.c'"

The string passed in is invalid due to bug 4389.

Test case:


import std.stdio;
import std.range;

string get()
{
	auto ds = "int x;"d;
	// build "int x;" from dchars
	
	string s;
	foreach(c; ds)
		s ~= c;
	
	return s;
}

void main()
{
	mixin(get());
}
Comment 1 Don 2010-11-23 00:57:51 UTC
Reduced test case moved to bug 4389, since it is has the same root cause.

*** This issue has been marked as a duplicate of issue 4389 ***