diff options
Diffstat (limited to 'src/tilde_stmt.cpp')
| -rw-r--r-- | src/tilde_stmt.cpp | 5 |
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: |