aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata
diff options
context:
space:
mode:
authorPaul Chaignon <paul.chaignon@gmail.com>2023-11-13 12:09:36 +0100
committerAleksandr Nogikh <nogikh@google.com>2023-11-28 10:18:54 +0000
commit885f5843663a1f3f2f2f059978d51725f8e803ef (patch)
tree86bc889cecbd729af8723c2ecf4d9ae346725238 /pkg/compiler/testdata
parent450f17c5f0e9824271e8b52a2c4a3fddfa339215 (diff)
compiler: prohibit homonymous flags and consts
Since both flags and consts can be used as type-options for integers, we want to avoid ambiguity by preventing a flag and a const from having the same name. Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'pkg/compiler/testdata')
-rw-r--r--pkg/compiler/testdata/errors2.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/errors2.txt b/pkg/compiler/testdata/errors2.txt
index e583094fa..1120f55ad 100644
--- a/pkg/compiler/testdata/errors2.txt
+++ b/pkg/compiler/testdata/errors2.txt
@@ -383,6 +383,9 @@ type type500 proc[C1, 8, int8] ### values starting from 1 with step 8 overflow b
type type501 int8 ### unused type type501
type type502[C] const[C, int8] ### unused type type502
+C2 = 0, 1, 2 ### const C2 is already a flag
+use_flags(a flags[C2])
+
s405 {
f1 int16:8[-256:0] ### int range [18446744073709551360:0] is too large for base type of size 8
f2 int16:8[0:256] ### int range [0:256] is too large for base type of size 8