From cc7316bb353db4f32e6bc3f25c6f505224ec9f55 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Mon, 26 Jun 2017 14:16:16 +0100 Subject: Fix IR printing for para-poly procedures --- src/check_expr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/check_expr.cpp') diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 43d870261..554b5a310 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -1150,7 +1150,7 @@ Type *check_get_params(Checker *c, Scope *scope, AstNode *_params, bool *is_vari } if (type_expr->kind == AstNode_HelperType) { if (operands != NULL) { - Operand o = (*operands)[i]; + Operand o = (*operands)[variable_index]; if (o.mode == Addressing_Type) { type = o.type; } else { @@ -1223,7 +1223,7 @@ Type *check_get_params(Checker *c, Scope *scope, AstNode *_params, bool *is_vari bool is_generic = type->kind == Type_Generic; Type *gen_type = type; if (operands != NULL) { - Operand o = (*operands)[j]; + Operand o = (*operands)[variable_index]; is_generic = o.mode == Addressing_Type && o.type == type; if (is_generic) gen_type = o.type; } -- cgit v1.2.3