diff options
| author | Paul Chaignon <paul.chaignon@gmail.com> | 2023-12-01 13:09:24 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2023-12-05 13:40:28 +0000 |
| commit | 781340bec8eda54d9d8edbd09dde6f7454911ce4 (patch) | |
| tree | 711208235d99763525e615c40900aef9c479fb62 /pkg/compiler/testdata/errors.txt | |
| parent | 8b813e96b14493924eb3dc4f0c323508fe3f8ddd (diff) | |
compiler: error on circular dependencies in flag definitions
To detect those circular dependencies, we simply keep track of which
flags we already visited when flattening the flags definition.
Suggested-by: Aleksandr Nogikh <nogikh@google.com>
Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'pkg/compiler/testdata/errors.txt')
| -rw-r--r-- | pkg/compiler/testdata/errors.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt index 321ff8daf..47d343e36 100644 --- a/pkg/compiler/testdata/errors.txt +++ b/pkg/compiler/testdata/errors.txt @@ -97,6 +97,12 @@ f3000 = 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, nested_flags(a flags[f1000], b flags[f1100]) +f110 = 1, 2, 3, 4, f120 ### flags f110 used twice or circular dependency on f110 +f120 = 10, 11, 12, f130 ### flags f120 used twice or circular dependency on f120 +f130 = 100, 110, f110 ### flags f130 used twice or circular dependency on f130 + +loop_flags(a flags[f110]) + resource r2[r0]: 2 resource r3[int32:1] ### unexpected ':', only struct fields can be bitfields resource r4[int32[opt]] ### resource base can't be marked as opt |
