gcc/testsuite/gdc.test/fail_compilation/fail142.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail142.d(21): Error: cannot create instance of abstract class `B` |
| 5 | fail_compilation/fail142.d(15): class `B` is declared here |
| 6 | fail_compilation/fail142.d(12): function `void test()` is not implemented |
| 7 | --- |
| 8 | */ |
| 9 | |
| 10 | class A |
| 11 | { |
| 12 | abstract void test() {} |
| 13 | } |
| 14 | |
| 15 | class B : A |
| 16 | { |
| 17 | } |
| 18 | |
| 19 | void main() |
| 20 | { |
| 21 | B b = new B(); |
| 22 | } |