From 730175841cc9a6454cd560155c0e051280a69b49 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Wed, 25 Sep 2019 23:33:29 +0200 Subject: [PATCH] Revert ":art: Remove arg flag" This reverts commit 82f00b7b4a517c723b3d0bf842d216a6f74ecb9c. --- src/parse/check.c | 2 +- src/parse/scan2.c | 2 +- util | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parse/check.c b/src/parse/check.c index 9f7f3dc0..1905510c 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -212,7 +212,7 @@ ANN static Value check_non_res_value(const Env env, const Exp_Primary* primary) } return v; } else if(env->func && GET_FLAG(env->func->def, global)) { - if(!SAFE_FLAG(value, abstract) && value->owner) + if(!SAFE_FLAG(value, abstract) && !SAFE_FLAG(value, arg)) ERR_O(exp_self(primary)->pos, _("non-global variable '%s' used from global function."), s_name(primary->d.var)) } diff --git a/src/parse/scan2.c b/src/parse/scan2.c index 8bc91b5f..f239b9cd 100644 --- a/src/parse/scan2.c +++ b/src/parse/scan2.c @@ -48,7 +48,7 @@ ANN static Value arg_value(MemPool p, const Arg_List list) { if(!var->value) { const Value v = new_value(p, list->type, var->xid ? s_name(var->xid) : (m_str)__func__); if(list->td) - v->flag = list->td->flag; + v->flag = list->td->flag | ae_flag_arg; return v; } var->value->type = list->type; diff --git a/util b/util index 719eafbf..3d2be8fd 160000 --- a/util +++ b/util @@ -1 +1 @@ -Subproject commit 719eafbff96155bb5018cc599023efd72265edfe +Subproject commit 3d2be8fdf552bdded221ddb266d55043c288da4a -- 2.43.0