aboutsummaryrefslogtreecommitdiff
path: root/src/tilde_stmt.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-07-22 11:16:29 +0100
committergingerBill <bill@gingerbill.org>2023-07-22 11:16:29 +0100
commit6c12156b1a47cb3c39e5c12d443e482af2a218bb (patch)
treea77bd904cb900cae01925f48fab04c9ae0f8ba4a /src/tilde_stmt.cpp
parenteec3b3009f0005090ddd5a7901e5f3c38cf31ce1 (diff)
Simplify procedure argument handling
Diffstat (limited to 'src/tilde_stmt.cpp')
-rw-r--r--src/tilde_stmt.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tilde_stmt.cpp b/src/tilde_stmt.cpp
index f0203e724..4fc00dd28 100644
--- a/src/tilde_stmt.cpp
+++ b/src/tilde_stmt.cpp
@@ -914,7 +914,10 @@ gb_internal void cg_build_assignment(cgProcedure *p, Array<cgAddr> const &lvals,
}
Type *type = cg_addr_type(lval);
- GB_ASSERT(are_types_identical(type, init.type));
+ if (!cg_addr_is_empty(lval)) {
+ GB_ASSERT_MSG(are_types_identical(init.type, type), "%s = %s", type_to_string(init.type), type_to_string(type));
+ }
+
if (init.kind == cgValue_Addr &&
!cg_addr_is_empty(lval)) {
// NOTE(bill): This is needed for certain constructs such as this: