May 05, 2004 BUG: Abstract class instantiation | ||||
---|---|---|---|---|
| ||||
The compiler will let me instantiate a class defined as abstract. The following code compiles and runs fine!?! abstract class Test1 { this() { printf("How can this be?\n"); } } int main ( char [] [] args ) { Test1 t1 = new Test1(); return 1; } This code compiles and runs ok outputting the message in the abstract class constructor. I believe this code should fail at compilation? Russell |
Copyright © 1999-2021 by the D Language Foundation