]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/g++.dg/contracts/contracts-nested-class1.C
c++: friend contracts are in complete-class context
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / contracts / contracts-nested-class1.C
index e6c362ab2a73edc6f6fde0b559abfde1f78f5d09..05c1cf131c446d34e8f252a4c91eb01de020c4fe 100644 (file)
@@ -16,7 +16,7 @@ struct Outer {
   // error about 'p' not being declared because the contracts haven't been
   // unified or remapped.
   friend void gfn(int p) [[ pre: p > 0 ]];
-  friend void gfn(int q) [[ pre: q > 1 ]]; // { dg-error "mismatched contract" }
+  friend void gfn(int q) [[ pre: q > 1 ]]; // { dg-error "'q' was not declared" }
 
   // This should be okay.
   friend void gfn2(int q);
@@ -24,4 +24,4 @@ struct Outer {
 
   static int bob;
 };
-int Outer::bob{-1};
\ No newline at end of file
+int Outer::bob{-1};