From 39e1df5caa8c4902b40f40ce17380022b39f81d5 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Fri, 11 Oct 2019 15:03:06 +0200 Subject: [PATCH] :art: Fix Ptr --- src/lib/ptr.c | 2 +- src/oo/type.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) 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; } -- 2.43.0