gcc/testsuite/gdc.test/fail_compilation/test23022.d
raw| 1 | /* |
| 2 | REQUIRED_ARGS: -preview=dip1000 |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/test23022.d(14): Error: returning `p` escapes a reference to variadic parameter `p` |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | // https://issues.dlang.org/show_bug.cgi?id=23022 |
| 10 | // Typesafe variadic parameter should not infer return |
| 11 | |
| 12 | auto ir(string[] p...) |
| 13 | { |
| 14 | return p; |
| 15 | } |