www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - DMD 0.126 - Nested struct non-static initializer crash thing..

reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
This causes DMD to crash:

class A
{
 class B
 {

 }

 B b=new B;
}

If class B is outside A, or if it is static, it just gives the error that 
"new B" is not a constant initializer. 
Jun 08 2005
parent Thomas Kuehne <thomas-dloop kuehne.this-is-spam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jarrett Billingsley schrieb am Wed, 8 Jun 2005 22:47:15 -0400:
 This causes DMD to crash:

 class A
 {
  class B
  {

  }

  B b=new B;
 }

 If class B is outside A, or if it is static, it just gives the error that 
 "new B" is not a constant initializer. 
Added to DStress as http://dstress.kuehne.cn/nocompile/n/new_23.d http://dstress.kuehne.cn/nocompile/n/new_24.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCqFc/3w+/yD4P9tIRAgX1AJ97xVXwAxQ3zo5x7lbnTroJ2u5I9QCgts+H jh6NrblslgOvHeYqM07w4/A= =ihPF -----END PGP SIGNATURE-----
Jun 09 2005