aboutsummaryrefslogtreecommitdiff
path: root/src/ssa/ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssa/ssa.c')
-rw-r--r--src/ssa/ssa.c5
1 files changed, 3 insertions, 2 deletions
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;