]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix static unions
authorfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 7 Jun 2019 20:59:16 +0000 (22:59 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 7 Jun 2019 20:59:16 +0000 (22:59 +0200)
src/parse/check.c

index 118a5924cd44bd28e6104b82b86a8de707dc2b8c..3aa5e50b7da6d6fdc66b290fb36b06d6ff597548 100644 (file)
@@ -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);