Files
ldc/tests/mini/bug198_ctfestructinit.d
Christian Kamm 01f19c466c Fix #198 and #199 by making CTFE on static struct initializers work.
Renamed SymbolDeclaration to StaticStructInitDeclaration to make its usage clearer.
2009-02-01 20:20:56 +01:00

13 lines
217 B
D

struct Color {
uint c;
static Color opCall(uint _c) { Color ret; ret.c = _c; return ret; }
}
// run at compile time
static const Color white = Color(0xffffffff);
void main()
{
assert(white.c == 0xffffffff);
}