diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-10 11:35:11 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-10 11:35:11 +0000 |
| commit | 3c6f90e5524d38bdd30750eb04441a1897bcd8dd (patch) | |
| tree | 50dc37f196b7a2d0c40e1382950511654d1333a2 /src/ir.cpp | |
| parent | 3703ca4df47134e0c274cf5096d14c9323331ff0 (diff) | |
Fix proc groups from import names
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index c869e550b..bf0378743 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -5080,8 +5080,11 @@ irValue *ir_build_expr(irProcedure *proc, AstNode *expr) { isize arg_count = 0; for_array(i, ce->args) { - AstNode *a = ce->args[i]; - Type *at = base_type(type_of_expr(proc->module->info, a)); + AstNode *arg = ce->args[i]; + TypeAndValue tav = type_and_value_of_expr(proc->module->info, arg); + GB_ASSERT_MSG(tav.mode != Addressing_Invalid, "%s", expr_to_string(arg)); + GB_ASSERT_MSG(tav.mode != Addressing_ProcGroup, "%s", expr_to_string(arg)); + Type *at = tav.type; if (at->kind == Type_Tuple) { arg_count += at->Tuple.variables.count; } else { |