| 1 |
// https://issues.dlang.org/show_bug.cgi?id=22202 |
| 2 |
|
| 3 |
/* |
| 4 |
TEST_OUTPUT: |
| 5 |
--- |
| 6 |
fail_compilation/fail22202.d(22): Error: function `fun` is not callable using argument types `(SystemCopy)` |
| 7 |
fail_compilation/fail22202.d(22): `inout ref inout(SystemCopy)(ref inout(SystemCopy) other)` copy constructor cannot be called from a `pure @safe nogc` context |
| 8 |
fail_compilation/fail22202.d(17): `fail22202.fun(SystemCopy __param_0)` declared here |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
struct SystemCopy |
| 13 |
{ |
| 14 |
this(ref inout SystemCopy other) inout {} |
| 15 |
} |
| 16 |
|
| 17 |
void fun(SystemCopy) @safe pure @nogc {} |
| 18 |
|
| 19 |
void main() @safe pure @nogc |
| 20 |
{ |
| 21 |
SystemCopy s; |
| 22 |
fun(s); |
| 23 |
} |