]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/gdc.test/fail_compilation/b19691.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / b19691.d
index 8663512fd2a88713f720fdca8886ff76a17d98b0..d01c76490ab749df52326749ea160668b318b3f5 100644 (file)
@@ -1,8 +1,7 @@
 // REQUIRED_ARGS: -de
 /* TEST_OUTPUT:
 ---
-fail_compilation/b19691.d(13): Error: forward reference to template `this`
-fail_compilation/b19691.d(19): Deprecation: constructor `b19691.S2.this` all parameters have default arguments, but structs cannot have default constructors.
+fail_compilation/b19691.d(12): Error: forward reference to template `this`
 ---
 */
 // https://issues.dlang.org/show_bug.cgi?id=19691
@@ -10,11 +9,11 @@ module b19691;
 
 struct S1 {
     this(T...)(T) {
-        S2("");
+        S2(42, "");
     }
 }
 
 struct S2 {
-    this(string) {}
-    this(S1 s = null) {}
+    this(int a, string) {}
+    this(int a, S1 s = null) {}
 }