From 6ef820ccdf30aad82ec5be7767b7b7b9e86bcfd5 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sun, 14 May 2017 22:43:18 +0100 Subject: need to tag the cycle for later code, so move the test --- limbo/types.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'limbo/types.c') 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); -- cgit v1.2.3