From 3c6f90e5524d38bdd30750eb04441a1897bcd8dd Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 10 Dec 2017 11:35:11 +0000 Subject: Fix proc groups from import names --- src/ir.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/ir.cpp') 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 { -- cgit v1.2.3