aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-06-28 10:09:46 +0100
committergingerBill <bill@gingerbill.org>2024-06-28 10:09:46 +0100
commitec38215842e75eeba5e10f1f8a1419b872eb6af9 (patch)
treed95b4a2789cd21d9f5a94e5fcd9c4a3b1ae5ad46 /src/check_type.cpp
parent67e9a6fd9bedf92498f41aa206d042566ad43595 (diff)
Fix #3803
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index c56c8a739..7fd9b379a 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -335,7 +335,7 @@ bool check_constant_parameter_value(Type *type, Ast *expr) {
gb_internal Type *check_record_polymorphic_params(CheckerContext *ctx, Ast *polymorphic_params,
bool *is_polymorphic_,
- Ast *node, Array<Operand> *poly_operands) {
+ Array<Operand> *poly_operands) {
Type *polymorphic_params_type = nullptr;
GB_ASSERT(is_polymorphic_ != nullptr);
@@ -643,13 +643,14 @@ gb_internal void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *
context = str_lit("struct #raw_union");
}
+ struct_type->Struct.node = node;
struct_type->Struct.scope = ctx->scope;
struct_type->Struct.is_packed = st->is_packed;
struct_type->Struct.is_no_copy = st->is_no_copy;
struct_type->Struct.polymorphic_params = check_record_polymorphic_params(
ctx, st->polymorphic_params,
&struct_type->Struct.is_polymorphic,
- node, poly_operands
+ poly_operands
);
wait_signal_set(&struct_type->Struct.polymorphic_wait_signal);
@@ -696,11 +697,12 @@ gb_internal void check_union_type(CheckerContext *ctx, Type *union_type, Ast *no
ast_node(ut, UnionType, node);
+ union_type->Union.node = node;
union_type->Union.scope = ctx->scope;
union_type->Union.polymorphic_params = check_record_polymorphic_params(
ctx, ut->polymorphic_params,
&union_type->Union.is_polymorphic,
- node, poly_operands
+ poly_operands
);
wait_signal_set(&union_type->Union.polymorphic_wait_signal);