Not sure if actual "[ICE]" or not, but anyways, reduced test case:
//----
struct S
{
int i;
}
S foo()
{
S s; //main.d(8)
auto p = &s;
p.i = 5;
return s;
}
void main()
{
enum s = foo();
}
//----
main.d(8): Error: CTFE internal error painting S*
//----
Marking as critical because:
- internal
- no idea what the message means
- test case is too trivial to crash
Comment #1 by yebblies — 2013-01-21T20:26:27Z
For some reason &S gets turned into paint S -> S* which, unsurprisingly, doesn't work.
int foo()
{
static struct S
{
int i;
}
S s;
(&s).i = 5;
return 1;
}
static assert(foo());
Comment #2 by clugdbug — 2013-01-22T08:22:23Z
Yeah it's just an internal error you should never see, it's just a bit nicer than most ICE bugs because it gives the line number.
Comment #3 by github-bugzilla — 2013-09-12T15:48:37Z