gcc/testsuite/gdc.test/fail_compilation/test15897.d
raw| 1 | // REQUIRED_ARGS: -de |
| 2 | // EXTRA_FILES: imports/test15897.d |
| 3 | /* |
| 4 | TEST_OUTPUT: |
| 5 | --- |
| 6 | fail_compilation/test15897.d(20): Error: no property `create` for `cat` of type `imports.test15897.Cat` |
| 7 | fail_compilation/imports/test15897.d(4): class `Cat` defined here |
| 8 | --- |
| 9 | */ |
| 10 | module test15897; |
| 11 | import imports.test15897; |
| 12 | |
| 13 | class Animal |
| 14 | { |
| 15 | private void create() {} |
| 16 | } |
| 17 | |
| 18 | void foo(Cat cat) |
| 19 | { |
| 20 | cat.create(); |
| 21 | } |