mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
28 lines
403 B
D
28 lines
403 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail341.d(26): Error: struct `fail341.S` is not copyable because field `t` is not copyable
|
|
fail_compilation/fail341.d(27): Error: function `fail341.foo` cannot be used because it is annotated with `@disable`
|
|
---
|
|
*/
|
|
|
|
struct T
|
|
{
|
|
@disable this(this)
|
|
{
|
|
}
|
|
}
|
|
|
|
struct S
|
|
{
|
|
T t;
|
|
}
|
|
|
|
@disable void foo() { }
|
|
|
|
void main()
|
|
{
|
|
S s;
|
|
auto t = s;
|
|
foo();
|
|
}
|