From 8b00fb631801aaadd00708718801eaee9ba3d7ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 6 May 2020 18:34:37 +0200 Subject: [PATCH] :art: Fix ref problem --- src/parse/scan1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/scan1.c b/src/parse/scan1.c index c83fa680..f7bbf02c 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -12,7 +12,7 @@ ANN static m_bool scan1_stmt(const Env env, Stmt stmt); ANN static m_bool type_recursive(const Env env, const Type_Decl *td, const Type t) { if(env->class_def && !env->scope->depth) { const m_int idx = vector_find(&env->scope->class_stack, (vtype)t); - if(idx > -1 || t == env->class_def) + if(!GET_FLAG(td, ref) && (idx > -1 || t == env->class_def)) ERR_B(td_pos(td), _("%s declared inside %s\n. (make it a ref ?)"), t->name, t == env->class_def ? "itself" : env->class_def->name); } -- 2.43.0