]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/gdc.test/fail_compilation/test16589.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test16589.d
index 205347b76033ddbc27cfe4429e4f0c5db93ed4e8..7b1f14f526faa5cc6d50ba49daa1b4df58e11f9d 100644 (file)
@@ -1,20 +1,20 @@
-/* PERMUTE_ARGS:
-REQUIRED_ARGS: -dip1000
+/*
+REQUIRED_ARGS: -preview=dip1000
 TEST_OUTPUT:
 ---
-fail_compilation/test16589.d(26): Error: returning `&this.data` escapes a reference to parameter `this`, perhaps annotate with `return`
-fail_compilation/test16589.d(31): Error: returning `&this` escapes a reference to parameter `this`, perhaps annotate with `return`
-fail_compilation/test16589.d(37): Error: returning `&s.data` escapes a reference to parameter `s`, perhaps annotate with `return`
-fail_compilation/test16589.d(42): Error: returning `&s` escapes a reference to parameter `s`, perhaps annotate with `return`
-fail_compilation/test16589.d(47): Error: returning `&s.data` escapes a reference to parameter `s`, perhaps annotate with `return`
-fail_compilation/test16589.d(52): Error: returning `& s` escapes a reference to parameter `s`, perhaps annotate with `return`
+fail_compilation/test16589.d(26): Error: returning `&this.data` escapes a reference to parameter `this`
+fail_compilation/test16589.d(26):        perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(31): Error: returning `&this` escapes a reference to parameter `this`
+fail_compilation/test16589.d(31):        perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(37): Error: returning `&s.data` escapes a reference to parameter `s`
+fail_compilation/test16589.d(37):        perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(42): Error: returning `&s` escapes a reference to parameter `s`
+fail_compilation/test16589.d(42):        perhaps annotate the parameter with `return`
+fail_compilation/test16589.d(47): Error: returning `&s.data` escapes a reference to local variable `s`
+fail_compilation/test16589.d(52): Error: returning `& s` escapes a reference to local variable `s`
 ---
 */
 
-
-
-
-
 // https://issues.dlang.org/show_bug.cgi?id=16589
 
 struct S
@@ -61,5 +61,3 @@ class C
         return &data;
     }
 }
-
-