summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2017-05-14 22:42:47 +0100
committerCharles Forsyth <charles.forsyth@gmail.com>2017-05-14 22:42:47 +0100
commit05e57594ef1cf45c2d44dd45ba268ef9df67dce3 (patch)
tree53995519e753c185b4e812b62ea6305a8bb665e6
parent7353052c1b3f72584fab5ff94e45f12987ec581b (diff)
need to tag the cycle for later code, so move the test
-rw-r--r--appl/cmd/limbo/types.b4
1 files changed, 2 insertions, 2 deletions
diff --git a/appl/cmd/limbo/types.b b/appl/cmd/limbo/types.b
index c14ff512..2ee207b3 100644
--- a/appl/cmd/limbo/types.b
+++ b/appl/cmd/limbo/types.b
@@ -1774,8 +1774,8 @@ cycfield(base: ref Type, id: ref Decl)
error(base.src.start, "illegal type cycle without a reference in field "
+id.sym.name+" of "+stypeconv(base));
id.cycerr = byte 1;
- }else if(arc & ArcCyc && oldcycles){
- if((arc & ArcArray) && id.cyc == byte 0 && !(arc & ArcPolycyc)){
+ }else if(arc & ArcCyc){
+ if((arc & ArcArray) && oldcycles && id.cyc == byte 0 && !(arc & ArcPolycyc)){
if(id.cycerr == byte 0)
error(base.src.start, "illegal circular reference to type "+typeconv(id.ty)
+" in field "+id.sym.name+" of "+stypeconv(base));