[Issue 242] New: template implicit template properties doesn't work

Thomas Kuehne thomas-dloop at kuehne.cn
Fri Jul 7 10:06:47 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-07-06:
> http://d.puremagic.com/issues/show_bug.cgi?id=242

> template x() { template x() { const x = 1; } }
> void main() { const y = x!()!(); }
>
> Gives:
> test.d(2): semicolon expected following auto declaration, not '!'
> test.d(2): found '!' instead of statement
>
> Instead, trying const y = x!().x!(), gives 
>
> test.d(2): template identifier x is not a member of x
>
> I can't see any way to instantiate the inner template when it is "an implicit
> template property".

Added to DStress as
http://dstress.kuehne.cn/run/t/template_37_A.d
http://dstress.kuehne.cn/run/t/template_37_B.d
http://dstress.kuehne.cn/run/t/template_37_C.d
http://dstress.kuehne.cn/run/t/template_37_D.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFErkiFLK5blCcjpWoRAqT2AJ9WQKSU7tTiUxfIH2XOQ4dO5oCLzACgpm9E
DyfsYYgZultsc0f067beVSg=
=RZF5
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list