From: fennecdjay Date: Fri, 11 Oct 2019 13:03:06 +0000 (+0200) Subject: :art: Fix Ptr X-Git-Tag: nightly~2181 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=39e1df5caa8c4902b40f40ce17380022b39f81d5;p=gwion.git :art: Fix Ptr --- diff --git a/src/lib/ptr.c b/src/lib/ptr.c index fd8188ca..9b9657dc 100644 --- a/src/lib/ptr.c +++ b/src/lib/ptr.c @@ -45,7 +45,7 @@ static OP_EMIT(opem_ptr_assign) { static OP_CHECK(opck_ptr_deref) { const Exp_Unary* unary = (Exp_Unary*)data; - return exp_self(unary)->type = nspc_lookup_type1(unary->exp->type->e->owner, insert_symbol(get_type_name(env, unary->exp->type->name, 1))); + return exp_self(unary)->type = nspc_lookup_type1(env->curr, insert_symbol(get_type_name(env, unary->exp->type->name, 1))); } static OP_CHECK(opck_ptr_cast) { diff --git a/src/oo/type.c b/src/oo/type.c index 7b5b3b5a..d9a03f1b 100644 --- a/src/oo/type.c +++ b/src/oo/type.c @@ -171,14 +171,11 @@ ANN m_str get_type_name(const Env env, const m_str s, const m_uint index) { ++name; while(*name++) { if(*name == '<') { + c[i++] = *name; lvl++; name++; } else if(*name == '~' && !lvl--) break; - if(*name == ',' && !lvl) { - ++name; - ++n; - } if(n == index) c[i++] = *name; }