From f36512455476e2ee70383d9d6e9ec620e05a4155 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 7 Jul 2020 19:15:54 +0200 Subject: [PATCH] :art: No shadowing in lib --- src/lib/object_op.c | 3 ++- src/lib/shred.c | 2 +- src/lib/string.c | 10 +++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/lib/object_op.c b/src/lib/object_op.c index acfa26f0..8cf1352a 100644 --- a/src/lib/object_op.c +++ b/src/lib/object_op.c @@ -392,7 +392,8 @@ ANN static Type scan_class(const Env env, const Type t, const Type_Decl* td) { return a->base.type; struct EnvSet es = { .env=env, .data=env, .func=(_exp_func)scan0_cdef, .scope=env->scope->depth, .flag=ae_flag_scan0 }; - CHECK_BO(envset_push(&es, t->e->owner_class, env->context ? env->context->nspc : env->curr)) +// CHECK_BO(envset_push(&es, t->e->owner_class, env->context ? env->context->nspc : env->curr)) + CHECK_BO(envset_push(&es, t->e->owner_class, t->e->ctx ? t->e->ctx->nspc : env->curr)) a->base.tmpl = mk_tmpl(env, t->e->def->base.tmpl, td->types); const m_bool ret = _scan_class(env, t, a); if(es.run) diff --git a/src/lib/shred.c b/src/lib/shred.c index 0ec0e32b..bcbf0c95 100644 --- a/src/lib/shred.c +++ b/src/lib/shred.c @@ -310,7 +310,7 @@ GWION_IMPORT(shred) { GWI_BB(gwi_func_end(gwi, vm_shred_id, ae_flag_none)) gwi_func_ini(gwi, "Shred", "fromId"); - gwi_func_arg(gwi, "int", "id"); + gwi_func_arg(gwi, "int", "xid"); GWI_BB(gwi_func_end(gwi, vm_shred_from_id, ae_flag_static)) gwi_func_ini(gwi, "void", "yield"); diff --git a/src/lib/string.c b/src/lib/string.c index 6723f0a6..db344bef 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -504,7 +504,7 @@ GWION_IMPORT(string) { gwi_func_ini(gwi, "int", "charAt"); gwi_func_arg(gwi, "int", "pos"); - gwi_func_arg(gwi, "int", "char"); + gwi_func_arg(gwi, "char", "c"); GWI_BB(gwi_func_end(gwi, string_setCharAt, ae_flag_none)) gwi_func_ini(gwi, "string", "insert"); @@ -524,12 +524,12 @@ GWION_IMPORT(string) { GWI_BB(gwi_func_end(gwi, string_replaceN, ae_flag_none)) gwi_func_ini(gwi, "int", "find"); - gwi_func_arg(gwi, "int", "char"); + gwi_func_arg(gwi, "char", "c"); GWI_BB(gwi_func_end(gwi, string_find, ae_flag_none)) gwi_func_ini(gwi, "int", "find"); gwi_func_arg(gwi, "int", "pos"); - gwi_func_arg(gwi, "int", "char"); + gwi_func_arg(gwi, "char", "c"); GWI_BB(gwi_func_end(gwi, string_findStart, ae_flag_none)) gwi_func_ini(gwi, "int", "find"); @@ -542,12 +542,12 @@ GWION_IMPORT(string) { GWI_BB(gwi_func_end(gwi, string_findStrStart, ae_flag_none)) gwi_func_ini(gwi, "int", "rfind"); - gwi_func_arg(gwi, "int", "char"); + gwi_func_arg(gwi, "char", "c"); GWI_BB(gwi_func_end(gwi, string_rfind, ae_flag_none)) gwi_func_ini(gwi, "int", "rfind"); gwi_func_arg(gwi, "int", "pos"); - gwi_func_arg(gwi, "int", "char"); + gwi_func_arg(gwi, "char", "c"); GWI_BB(gwi_func_end(gwi, string_rfindStart, ae_flag_none)) gwi_func_ini(gwi, "int", "rfind"); -- 2.43.0