mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
16 lines
348 B
D
16 lines
348 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail336.d(16): Error: struct `S` has constructors, cannot use `{ initializers }`, use `S( initializers )` instead
|
|
---
|
|
*/
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=3476
|
|
// C-style initializer for structs must be disallowed for structs with a constructor
|
|
struct S
|
|
{
|
|
int a;
|
|
this(int) {}
|
|
}
|
|
|
|
S s = { 1 };
|