www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - dmd crasher: member static array sized using enum

reply Tim Keating <Tim_member pathlink.com> writes:
Declaring a statically-sized array member using enum.max before the enum is
declared lexically causes dmd to crash.

Here is a minimal test case:

class Test
{
int[Foo.max] intArray;
}

int main(char[][] args)
{
return 1;
}

enum Foo
{
Bar = 0,
Baz,
FooBar,
FooBaz,
BarBaz
}


Tim Keating
Jan 27 2006
next sibling parent Tim Keating <Tim_member pathlink.com> writes:
Er, I probably should have mentioned this is using .144 on Windows :)

Tim Keating
Jan 27 2006
prev sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Keating schrieb am 2006-01-27:
 Declaring a statically-sized array member using enum.max before the enum is
 declared lexically causes dmd to crash.

 Here is a minimal test case:

 class Test
 {
 int[Foo.max] intArray;
 }

 int main(char[][] args)
 {
 return 1;
 }

 enum Foo
 {
 Bar = 0,
 Baz,
 FooBar,
 FooBaz,
 BarBaz
 }
Added to DStress as http://dstress.kuehne.cn/run/e/enum_43_A.d http://dstress.kuehne.cn/run/e/enum_43_B.d http://dstress.kuehne.cn/run/e/enum_43_C.d http://dstress.kuehne.cn/run/e/enum_43_D.d http://dstress.kuehne.cn/run/e/enum_43_E.d http://dstress.kuehne.cn/run/e/enum_43_F.d http://dstress.kuehne.cn/run/e/enum_43_G.d http://dstress.kuehne.cn/run/e/enum_43_I.d http://dstress.kuehne.cn/run/e/enum_43_J.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFD2iFw3w+/yD4P9tIRAigKAJ937I5hett4cbt+cvkJuTisH8ChmACfREz7 OcZyxnd2bsVkT1Kvz79sur8= =5AG4 -----END PGP SIGNATURE-----
Jan 27 2006