1 // REQUIRED_ARGS: -de 2 /* 3 TEST_OUTPUT: 4 --- 5 fail_compilation/diag3438.d(16): Deprecation: constructor diag3438.F1.this all parameters have default arguments, but structs cannot have default constructors. 6 fail_compilation/diag3438.d(17): Deprecation: constructor diag3438.F2.this all parameters have default arguments, but structs cannot have default constructors. 7 fail_compilation/diag3438.d(20): Deprecation: constructor diag3438.F5.this @disable'd constructor cannot have default arguments for all parameters. 8 fail_compilation/diag3438.d(20): Use @disable this(); if you want to disable default initialization. 9 fail_compilation/diag3438.d(21): Deprecation: constructor diag3438.F6.this @disable'd constructor cannot have default arguments for all parameters. 10 fail_compilation/diag3438.d(21): Use @disable this(); if you want to disable default initialization. 11 --- 12 */ 13 14 import core.vararg; 15 16 struct F1 { this(int x = 1) { } } 17 struct F2 { this(int x = 1, ...) { } } thisF318struct F3 { this(...) { } } // ok this(int[]x...)19struct F4 { this(int[] x...) { } } // ok 20 struct F5 { @disable this(int x = 1); } 21 struct F6 { @disable this(int x = 1) { } } 22