mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
24 lines
361 B
D
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;
|
|
}
|