gcc/testsuite/gdc.test/fail_compilation/test19608.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=19608 |
| 2 | /* |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/test19608.d(15): Error: cannot pass function `*& f` as a function argument |
| 6 | --- |
| 7 | */ |
| 8 | import core.stdc.stdarg; |
| 9 | |
| 10 | void f(int) {} |
| 11 | void g(...) {} |
| 12 | void h() |
| 13 | { |
| 14 | g(&f); // OK, function address |
| 15 | g(*&f); // ICE -> Error |
| 16 | } |