www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - compiler segfault with mangleof and alias termplate arguments

reply Don Clugston <dac nospam.com.au> writes:
Finding new ways to torture these new features...
I'm not sure which of these is the problem, but this is as far
as I've been able to simplify it.
--------
template chook(int n)
{
   const int chook = 3;
}

template dog(alias f) {
    int dog =  chook!(f.mangleof.length);
}

class pig {}

const int goose = dog!(pig);
Dec 06 2005
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Don Clugston schrieb am 2005-12-06:
 Finding new ways to torture these new features...
 I'm not sure which of these is the problem, but this is as far
 as I've been able to simplify it.
 --------
 template chook(int n)
 {
    const int chook = 3;
 }

 template dog(alias f) {
     int dog =  chook!(f.mangleof.length);
 }

 class pig {}

 const int goose = dog!(pig);
Added to DStress as http://dstress.kuehne.cn/run/m/mangleof_14_A.d http://dstress.kuehne.cn/run/m/mangleof_14_B.d http://dstress.kuehne.cn/run/m/mangleof_14_C.d http://dstress.kuehne.cn/run/m/mangleof_14_D.d http://dstress.kuehne.cn/run/m/mangleof_14_E.d http://dstress.kuehne.cn/run/m/mangleof_14_F.d http://dstress.kuehne.cn/run/m/mangleof_14_G.d http://dstress.kuehne.cn/run/m/mangleof_14_H.d http://dstress.kuehne.cn/run/m/mangleof_14_I.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDmmM83w+/yD4P9tIRAk2nAJsFzYfGqR7hn6Yh64oDiGgL2HaxXwCgqewu SLLrW40JUt8/9VIGJTcVQQA= =K1hn -----END PGP SIGNATURE-----
Dec 09 2005