www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - calling super from method

reply "Carlos Santander B." <csantander619 gmail.com> writes:
The following makes DMD to crash:

//--------------------
class A
{
     void foo()
     {
         super();  // line 5
     }
}
//--------------------

dmd -c -v test.d
test.d(5): super class constructor call must be in a constructor
[CRASH]

DMD 0.120, Windows and linux.
gdc 0.10, linux and cygwin.

-- 
Carlos Santander Bernal

JP2, you'll always live in our minds
Apr 07 2005
parent Thomas Kuehne <thomas-dloop kuehne.thisisspam.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carlos Santander B. schrieb am Thu, 07 Apr 2005 21:50:59 -0500:
 The following makes DMD to crash:

 //--------------------
 class A
 {
      void foo()
      {
          super();  // line 5
      }
 }
 //--------------------

 dmd -c -v test.d
 test.d(5): super class constructor call must be in a constructor
 [CRASH]

 DMD 0.120, Windows and linux.
 gdc 0.10, linux and cygwin.

Added to DStress as http://dstress.kuehne.cn/nocompile/super_10.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFCVheF3w+/yD4P9tIRAjVMAJ494NBZg5zD4UaIoTe7rssvd7UEgACeOubZ 8slrLPVg/5YP9+KBpo+Lhio= =lynF -----END PGP SIGNATURE-----
Apr 07 2005