d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail22202.d
blobd865fd95553af8786aa1872432e3f5901de0c5bb
1 // https://issues.dlang.org/show_bug.cgi?id=22202
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail22202.d(21): Error: function `fail22202.fun(SystemCopy __param_0)` is not callable using argument types `(SystemCopy)`
7 fail_compilation/fail22202.d(21): `inout ref inout(SystemCopy)(ref inout(SystemCopy) other)` copy constructor cannot be called from a `pure @safe nogc` context
8 ---
9 */
11 struct SystemCopy
13 this(ref inout SystemCopy other) inout {}
16 void fun(SystemCopy) @safe pure @nogc {}
18 void main() @safe pure @nogc
20 SystemCopy s;
21 fun(s);