www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - abstract attribute bug

reply "John C" <johnch_atms hotmail.com> writes:
DMD 0.138 allows function bodies for abstract functions, but derived types 
are still supposed to override the abstract functions. However, this 
following code shows that 'abstract' appears to be ignored.

class AbstractTest {

    abstract void test() {
    }

}

class ConcreteTest : AbstractTest {
}

ConcreteTest concreteTest = new ConcreteTest;
concreteTest.test(); 
Nov 09 2005
parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John C schrieb am 2005-11-09:
 DMD 0.138 allows function bodies for abstract functions, but derived types 
 are still supposed to override the abstract functions. However, this 
 following code shows that 'abstract' appears to be ignored.

 class AbstractTest {

     abstract void test() {
     }

 }

 class ConcreteTest : AbstractTest {
 }

 ConcreteTest concreteTest = new ConcreteTest;
 concreteTest.test(); 
Added to DStress as http://dstress.kuehne.cn/nocompile/a/abstract_15.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDdksc3w+/yD4P9tIRAtluAJ0RymAxfl1mucpEXNClsE4AIynWxQCfdjxY KT6PZ5F+WbFEMqLVSTYeRII= =R8Q5 -----END PGP SIGNATURE-----
Nov 12 2005