From: Jérémie Astor Date: Tue, 30 Mar 2021 18:13:20 +0000 (+0200) Subject: :art: Update X-Git-Tag: nightly~805 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=25d2bca2e5c2723df1a049cc5fb3651fc06c4b92;p=gwion.git :art: Update --- diff --git a/plug b/plug index 9a15fdc1..12374dd4 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit 9a15fdc1f9a07e05576dbbe8f09cb6218e517781 +Subproject commit 12374dd4d90304931b66ba0fc89b1e74ee793d8e diff --git a/src/env/type.c b/src/env/type.c index 972937f9..4611b4ff 100644 --- a/src/env/type.c +++ b/src/env/type.c @@ -40,12 +40,12 @@ Type new_type(MemPool p, const m_str name, const Type parent) { } ANN Type type_copy(MemPool p, const Type type) { - const Type a = new_type(p, type->name, type->info->parent); - a->nspc = type->nspc; + const Type a = new_type(p, type->name, type->info->parent); + a->nspc = type->nspc; a->info->owner = type->info->owner; a->info->owner_class = type->info->owner_class; - a->size = type->size; - a->array_depth = type->array_depth; + a->size = type->size; + a->array_depth = type->array_depth; a->info->gack = type->info->gack; return a; } diff --git a/src/lib/ref.c b/src/lib/ref.c index 71c15c7c..cf0149a6 100644 --- a/src/lib/ref.c +++ b/src/lib/ref.c @@ -61,12 +61,17 @@ OP_CHECK(opck_foreach_scan) { return exists != env->gwion->type[et_error] ? exists : NULL; const Type base = known_type(env, ts->td->types->td); const Type t = new_type(env->gwion->mp, s_name(info.name), base); + t->info->owner = base->info->owner; + t->info->owner_class = base->info->owner_class; + t->info->ctx = base->info->ctx; SET_FLAG(t, abstract | ae_flag_final); set_tflag(t, tflag_infer); const m_uint scope = env_push(env, base->info->owner_class, base->info->owner); +// mk_class(env, t, (loc_t){}); base2ref(env, base, t); ref2base(env, t, base); env_pop(env, scope); + nspc_add_type_front(t->info->owner, info.name, t); return t; }