From 142a13ad3f77c0ad1bd321d1a1f864a5117896d1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 18 Sep 2019 14:28:12 +0200 Subject: Fix import func call build --- src/ssa/ssa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ssa') diff --git a/src/ssa/ssa.c b/src/ssa/ssa.c index d76ad28..9955d9d 100644 --- a/src/ssa/ssa.c +++ b/src/ssa/ssa.c @@ -658,7 +658,8 @@ static CHECK_RESULT SsaRegister funccall_generate_ssa(FunctionCall *self, SsaCom assert(resolve_data->type.type == RESOLVED_TYPE_FUNC_SIG); func_sig = resolve_data->type.value.func_sig; } else { - assert(bool_false); + assert(func_lhs_expr->rhs_expr && func_lhs_expr->rhs_expr->resolve_data.type.type == RESOLVED_TYPE_FUNC_SIG); + func_sig = func_lhs_expr->rhs_expr->resolve_data.type.value.func_sig; } func_decl = func_sig->func_decl; @@ -775,7 +776,7 @@ static CHECK_RESULT SsaRegister binop_generate_ssa(Binop *self, SsaCompilerConte const std = @import("std.amal"); std.printf */ - if(self->type == BINOP_DOT && self->rhs->resolve_data.type.type == RESOLVED_TYPE_FUNC_SIG) { + if(self->type == BINOP_DOT && self->rhs->type == AST_FUNCTION_CALL) { Import *lhs_import = binop_lhs_get_import_or_null(self); if(lhs_import) context->import_index = 1 + lhs_import->file_scope->import_index; -- cgit v1.2.3