February 11, 2006
DMD 0.146 on Windows XP SP2.

--
template Foo(TYPE) {}

void main() {
	alias Foo!(int) Foo;
}
--

-> "alias Foo recursive alias declaration" and a compiler crash.

Put the alias outside the function and it works (that is, doesn't compile, but
doesn't crash either).

Same problem happens with typedef, except then there's no error message, the compiler just crashes.

Change "template" to "class" and no change.
February 11, 2006
Deewiant schrieb am 2006-02-11:
> DMD 0.146 on Windows XP SP2.
>
> --
> template Foo(TYPE) {}
>
> void main() {
> 	alias Foo!(int) Foo;
> }
> --
>
> -> "alias Foo recursive alias declaration" and a compiler crash.
>
> Put the alias outside the function and it works (that is, doesn't compile, but
> doesn't crash either).
>
> Same problem happens with typedef, except then there's no error message, the compiler just crashes.
>
> Change "template" to "class" and no change.

Added to DStress as http://dstress.kuehne.cn/nocompile/a/alias_30_A.d http://dstress.kuehne.cn/nocompile/a/alias_30_B.d http://dstress.kuehne.cn/nocompile/a/alias_30_C.d http://dstress.kuehne.cn/nocompile/a/alias_30_D.d http://dstress.kuehne.cn/nocompile/a/alias_30_E.d http://dstress.kuehne.cn/nocompile/a/alias_30_F.d http://dstress.kuehne.cn/nocompile/a/alias_30_G.d http://dstress.kuehne.cn/run/a/alias_30_H.d http://dstress.kuehne.cn/run/a/alias_30_I.d http://dstress.kuehne.cn/nocompile/t/typedef_11_A.d http://dstress.kuehne.cn/nocompile/t/typedef_11_B.d http://dstress.kuehne.cn/nocompile/t/typedef_11_C.d http://dstress.kuehne.cn/nocompile/t/typedef_11_D.d http://dstress.kuehne.cn/nocompile/t/typedef_11_E.d http://dstress.kuehne.cn/nocompile/t/typedef_11_F.d http://dstress.kuehne.cn/nocompile/t/typedef_11_F.d http://dstress.kuehne.cn/nocompile/t/typedef_11_G.d http://dstress.kuehne.cn/run/t/typedef_11_H.d http://dstress.kuehne.cn/run/t/typedef_11_I.d

Thomas