From c1a191507c7d13d613655dcd5f0d7ff6b6f11d97 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Fri, 7 Jun 2019 22:59:16 +0200 Subject: [PATCH] :bug: Fix static unions --- src/parse/check.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.43.0