aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata/errors.txt
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-04 19:52:41 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-04 20:25:22 +0200
commitf29b943c0b672ff7f02c1046416f1b85d7344bfb (patch)
treeecd4f70e01322d26aadc3b43cdc612a547cf2eb8 /pkg/compiler/testdata/errors.txt
parentf400a0da0fcd3e4d27d915b57c54f504813ef1d3 (diff)
pkg/compiler: detect recursive struct declarations
Update #217
Diffstat (limited to 'pkg/compiler/testdata/errors.txt')
-rw-r--r--pkg/compiler/testdata/errors.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt
index 68c9895bf..feb0fed35 100644
--- a/pkg/compiler/testdata/errors.txt
+++ b/pkg/compiler/testdata/errors.txt
@@ -152,3 +152,34 @@ define d1 `some C expression`
define d2 some C expression
define d2 SOMETHING ### duplicate define d2
define d3 1
+
+sr1 {
+ f1 sr1 ### recursive declaration: sr1.f1 -> sr1 (mark some pointers as opt)
+}
+
+sr2 {
+ f1 sr3
+ f2 sr4
+}
+
+sr3 {
+ f1 ptr[in, sr3] ### recursive declaration: sr3.f1 -> sr3 (mark some pointers as opt)
+}
+
+sr4 {
+ f1 ptr[in, sr3]
+ f2 array[ptr[in, sr5], 4] ### recursive declaration: sr4.f2 -> sr5.f2 -> sr6.f1 -> sr4 (mark some pointers as opt)
+}
+
+sr5 [
+ f1 int32
+ f2 sr6
+]
+
+sr6 {
+ f1 sr4
+}
+
+sr7 {
+ f1 ptr[in, sr7, opt]
+}