From ce55048ed8aa387b05bef18cfeb96b31b3abb081 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sun, 14 May 2017 22:27:49 +0100 Subject: use %p not %lux --- limbo/types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'limbo/types.c') diff --git a/limbo/types.c b/limbo/types.c index 6d231115..32955483 100644 --- a/limbo/types.c +++ b/limbo/types.c @@ -3466,7 +3466,7 @@ expandtype(Type *t, Type *instt, Decl *adtt, Tpair **tp) if(t == nil) return nil; -if(debug['w']) print("expandtype %d %lux %T\n", t->kind, (ulong)t, t); +if(debug['w']) print("expandtype %d %#p %T\n", t->kind, t, t); if(!toccurs(t, tp)) return t; if(debug['w']) print("\texpanding\n"); -- cgit v1.2.3 From 02ed2dd7ed0e81f2e99aa3b52f1eccb59a3140f4 Mon Sep 17 00:00:00 2001 From: Charles Forsyth Date: Sun, 14 May 2017 22:30:26 +0100 Subject: unless oldcycles, circular reference via array is now fine --- limbo/types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'limbo/types.c') diff --git a/limbo/types.c b/limbo/types.c index 32955483..8c225279 100644 --- a/limbo/types.c +++ b/limbo/types.c @@ -2023,7 +2023,7 @@ 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){ + }else if(arc & ArcCyc && oldcycles){ if((arc & ArcArray) && id->cyc == 0 && !(arc & ArcPolycyc)){ if(id->cycerr == 0) error(base->src.start, "illegal circular reference to type %T in field %s of %t", -- cgit v1.2.3 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