Test case shouldn't compile however the compiler errors. Minimized using dustmite:
struct Foo {
string _str;
long _integer;
template DeclareConstructor(string propertyName) {
enum code = `this(typeof(_` ~ propertyName ~ `) value) {
` ~ propertyName ~ ` = value;
}`;
mixin(code);
}
mixin DeclareConstructor!"str";
mixin DeclareConstructor!"integer";
}
void main() {
auto value = Foo;
value.object = Foo("D");
}
Replacing enum from code variable with auto stops the ICE.
Comment #1 by yazan.dabain — 2013-06-23T13:30:31Z
Edit: changed assertion line to 8364 based on git HEAD commit 58d3869.
Comment #2 by code — 2013-06-26T22:09:53Z
*** Issue 10450 has been marked as a duplicate of this issue. ***
Comment #3 by bearophile_hugs — 2013-06-27T04:28:19Z
(In reply to comment #2)
> *** Issue 10450 has been marked as a duplicate of this issue. ***
This issue gives:
Assertion failure: 'td' on line 8375 in file 'expression.c'
Issue 10450 gives:
Internal error: backend\cgcv.c 2162
It's totally different code, a different source file, so I think you are wrong.