[Issue 752] New: Assertion failure: 'e->type->ty != Ttuple' on line 4518 in file 'mtype.c'
Thomas Kuehne
thomas-dloop at kuehne.cn
Wed Dec 27 04:07:57 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-12-26:
> http://d.puremagic.com/issues/show_bug.cgi?id=752
> The code:
>
> struct Tuple( TList... )
> {
> const size_t length = TList.length;
>
> private:
> typeof(TList[0]) head;
> static if( length > 1 )
> mixin .Tuple!((TList[1 .. $])) tail;
> }
>
> void main()
> {
> Tuple!(int, long) T;
> T val;
> printf( "%u\n", val.length );
> }
>
> Gives the following errors:
>
> C:\code\src\d\test>dmd test
> test.d(9): Error: Integer constant expression expected instead of
> cast(int)(__dollar)
> test.d(9): Error: string slice [1 .. 0] is out of bounds
> Assertion failure: 'e->type->ty != Ttuple' on line 4518 in file 'mtype.c'
>
> abnormal program termination
>
> The __dollar issue can be eliminated by replacing '$' with TList.length, but
> the assertion failure remains. Marking ICE on valid despite the dollar issue.
Added to DStress as
http://dstress.kuehne.cn/nocompile/t/tuple_09_A.d
http://dstress.kuehne.cn/nocompile/t/tuple_09_B.d
http://dstress.kuehne.cn/nocompile/t/tuple_09_C.d
http://dstress.kuehne.cn/nocompile/t/tuple_09_D.d
http://dstress.kuehne.cn/nocompile/t/tuple_09_E.d
http://dstress.kuehne.cn/nocompile/t/tuple_09_F.d
http://dstress.kuehne.cn/compile/t/tuple_09_G.d
http://dstress.kuehne.cn/compile/t/tuple_09_H.d
http://dstress.kuehne.cn/compile/t/tuple_09_I.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFklE+LK5blCcjpWoRAnUeAKClxusf62DZEhW/Ey0m3sHxrwAIcQCdHbGe
zlSTxLz0aJSqKBftW68VrAs=
=6sed
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list