summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2017-05-14 22:43:18 +0100
committerCharles Forsyth <charles.forsyth@gmail.com>2017-05-14 22:43:18 +0100
commit6ef820ccdf30aad82ec5be7767b7b7b9e86bcfd5 (patch)
treea9bd6c4cd3509592a47643e6d4ee3bc1be5a88b8
parent05e57594ef1cf45c2d44dd45ba268ef9df67dce3 (diff)
need to tag the cycle for later code, so move the test
-rw-r--r--limbo/types.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/limbo/types.c b/limbo/types.c
index 8c225279..c8105d5a 100644
--- a/limbo/types.c
+++ b/limbo/types.c
@@ -2023,8 +2023,8 @@ cycfield(Type *base, Decl *id)
error(base->src.start, "illegal type cycle without a reference in field %s of %t",
id->sym->name, base);
id->cycerr = 1;
- }else if(arc & ArcCyc && oldcycles){
- if((arc & ArcArray) && id->cyc == 0 && !(arc & ArcPolycyc)){
+ }else if(arc & ArcCyc){
+ if((arc & ArcArray) && oldcycles && id->cyc == 0 && !(arc & ArcPolycyc)){
if(id->cycerr == 0)
error(base->src.start, "illegal circular reference to type %T in field %s of %t",
id->ty, id->sym->name, base);