middle-end: always find a basename for -fdiagnostics-format=*
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test22593.d
bloba47c0fe95b761dd76e3800620d77b6eea402b051
1 // https://issues.dlang.org/show_bug.cgi?id=22593
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/test22593.d(14): Error: cannot define both an rvalue constructor and a copy constructor for `struct Foo`
7 fail_compilation/test22593.d(22): Template instance `__ctor!(immutable(Foo!int), immutable(Foo!int))` creates a rvalue constructor for `struct Foo`
8 fail_compilation/test22593.d(22): Error: template instance `test22593.Foo!int.Foo.__ctor!(immutable(Foo!int), immutable(Foo!int))` error instantiating
9 ---
12 struct Foo(T)
14 this(Rhs, this This)(scope Rhs rhs){}
16 this(ref scope typeof(this) rhs){}
19 void main()
21 immutable Foo!int a;
22 a.__ctor(a);