dmd/compiler/test/fail_compilation/test21198.d
2022-07-09 18:53:07 +02:00

24 lines
361 B
D

// https://issues.dlang.org/show_bug.cgi?id=21198
/*
TEST_OUTPUT:
---
fail_compilation/test21198.d(23): Error: generating an `inout` copy constructor for `struct test21198.U` failed, therefore instances of it are uncopyable
---
*/
struct S
{
this(ref inout(S) other) inout {}
}
union U
{
S s;
}
void fun()
{
U original;
U copy = original;
}