From 8dc8b7ac3ca77268715e8c283c6ffc3de1f39dc8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Thu, 3 Dec 2020 06:53:43 +0100 Subject: [PATCH] :art: Allow import of Child[A]:Parent[A] --- src/import/import_cdef.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/import/import_cdef.c b/src/import/import_cdef.c index d4c12b91..f71cf098 100644 --- a/src/import/import_cdef.c +++ b/src/import/import_cdef.c @@ -64,12 +64,6 @@ ANN static Type type_finish(const Gwi gwi, const Type t) { return t; } -ANN2(1,2) Type handle_class(const Gwi gwi, Type_Decl *td) { - DECL_OO(const Type, p, = known_type(gwi->gwion->env, td)) - CHECK_BO(class_parent(gwi->gwion->env, p)) - return p; -} - ANN2(1,2) Type gwi_class_ini(const Gwi gwi, const m_str name, const m_str parent) { struct ImportCK ck = { .name=name }; CHECK_BO(check_typename_def(gwi, &ck)) @@ -81,7 +75,7 @@ ANN2(1,2) Type gwi_class_ini(const Gwi gwi, const m_str name, const m_str parent const Type_List tl = td->types; if(tflag(base, tflag_ntmpl)) td->types = NULL; - const Type p = !td->types ? handle_class(gwi, td) : NULL; + const Type p = !td->types ? known_type(gwi->gwion->env, td) : NULL; td->types = tl; if(tmpl) nspc_pop_type(gwi->gwion->mp, gwi->gwion->env->curr); -- 2.43.0