| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/diag9451.d(27): Error: cannot create instance of abstract class `C2` |
| 5 |
fail_compilation/diag9451.d(21): class `C2` is declared here |
| 6 |
fail_compilation/diag9451.d(15): function `void f1()` is not implemented |
| 7 |
fail_compilation/diag9451.d(16): function `void f2(int)` is not implemented |
| 8 |
fail_compilation/diag9451.d(17): function `void f2(float) const` is not implemented |
| 9 |
fail_compilation/diag9451.d(18): function `int f2(float) pure` is not implemented |
| 10 |
--- |
| 11 |
*/ |
| 12 |
|
| 13 |
class C1 |
| 14 |
{ |
| 15 |
abstract void f1(); |
| 16 |
abstract void f2(int); |
| 17 |
abstract void f2(float) const; |
| 18 |
abstract int f2(float) pure; |
| 19 |
} |
| 20 |
|
| 21 |
class C2 : C1 |
| 22 |
{ |
| 23 |
} |
| 24 |
|
| 25 |
void main() |
| 26 |
{ |
| 27 |
auto c2 = new C2; |
| 28 |
} |