From: fennecdjay Date: Fri, 7 Jun 2019 20:59:16 +0000 (+0200) Subject: :bug: Fix static unions X-Git-Tag: nightly~2443^2~20 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c1a191507c7d13d613655dcd5f0d7ff6b6f11d97;p=gwion.git :bug: Fix static unions --- diff --git a/src/parse/check.c b/src/parse/check.c index 118a5924..3aa5e50b 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -1001,8 +1001,8 @@ ANN m_bool check_stmt_union(const Env env, const Stmt_Union stmt) { if(!GET_FLAG(stmt, static)) stmt->o = env->class_def->nspc->info->offset; else { - stmt->o = stmt->type->nspc->info->class_data_size; - stmt->type->nspc->info->class_data_size += SZ_INT; + stmt->o = env->class_def->nspc->info->class_data_size; + env->class_def->nspc->info->class_data_size += SZ_INT; } } const m_uint scope = union_push(env, stmt);