]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gdc.test/fail_compilation/diaginref.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diaginref.d
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) {}