gcc/testsuite/gdc.test/fail_compilation/diaginref.d
raw| 1 | /* |
| 2 | REQUIRED_ARGS: -preview=in |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/diaginref.d(11): Error: attribute `ref` is redundant with previously-applied `in` |
| 6 | fail_compilation/diaginref.d(13): Error: attribute `in` cannot be added after `ref`: remove `ref` |
| 7 | --- |
| 8 | */ |
| 9 | |
| 10 | void foo(in string) {} |
| 11 | void foo1(in ref string) {} |
| 12 | void foo2(T)(in T v, string) {} |
| 13 | void foo3(T)(ref in T v, string) {} |