mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
26 lines
328 B
D
26 lines
328 B
D
// https://issues.dlang.org/show_bug.cgi?id=12764
|
|
|
|
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail12764.d(20): Error: field `s` must be initialized in constructor
|
|
---
|
|
*/
|
|
|
|
struct S
|
|
{
|
|
@disable this();
|
|
|
|
this(string) { }
|
|
int f;
|
|
}
|
|
|
|
class C
|
|
{
|
|
this(int)
|
|
{
|
|
s.f = 1; // circumvents default ctor!
|
|
}
|
|
|
|
S s;
|
|
}
|