[Issue 572] New: syntax error when using template instantiation with typeof
Thomas Kuehne
thomas-dloop at kuehne.cn
Sat Nov 25 05:47:39 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail at puremagic.com schrieb am 2006-11-19:
> http://d.puremagic.com/issues/show_bug.cgi?id=572
> class Test{
> static const test2=1;
> template test(){
> const int test=1;
> }
> }
>
> void main(){
> auto a=new Test;
> static assert(typeof(a).test2==1);//ok
> alias typeof(a) t;
> static assert(t.test!()==1);//ok
> static assert(typeof(a).test!()==1);//syntax error
> }
Added to DStress as
http://dstress.kuehne.cn/compile/t/typeof_15_A.d
http://dstress.kuehne.cn/compile/t/typeof_15_B.d
http://dstress.kuehne.cn/compile/t/typeof_15_C.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFaEh6LK5blCcjpWoRAiWBAJ4xw9WFGZ90lO6mSQ5baAqejlWtYACgjre2
rHPttb/ti4zwesxXCR5Ir50=
=gX9g
-----END PGP SIGNATURE-----
More information about the Digitalmars-d-bugs
mailing list