www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - assert fail expression.c line 674

reply Don Clugston <dac nospam.com.au> writes:
template tree(int n)
{
   const int tree = 1;
}

template getsize()
{
   const int getsize = sizeof(tree!(1));
}

template forest() {
    const int sz = getsize!();
    const int done = tree!( sz );
}

const int crash = forest!().done;
Jan 25 2006
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Don Clugston schrieb am 2006-01-25:
 template tree(int n)
 {
    const int tree = 1;
 }

 template getsize()
 {
    const int getsize = sizeof(tree!(1));
 }

 template forest() {
     const int sz = getsize!();
     const int done = tree!( sz );
 }

 const int crash = forest!().done;
Added to DStress as http://dstress.kuehne.cn/run/s/sizeof_16_A.d http://dstress.kuehne.cn/nocompile/s/sizeof_16_B.d http://dstress.kuehne.cn/nocompile/s/sizeof_16_C.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFD2VIY3w+/yD4P9tIRAhW3AKCdesQd9S4l5VuhEpyyawZ0/y2FcQCdGdvu BCgKjoo4nQNtosfC4TEGY3k= =cLuL -----END PGP SIGNATURE-----
Jan 27 2006