From e5418c690667c3567b660fe80a8b48705f1d5abd Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sat, 15 Jan 2022 10:16:18 -0600 Subject: [PATCH] bugfix with new interface system --- src/checker.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/checker.c b/src/checker.c index a5afb507..2abaa5f9 100644 --- a/src/checker.c +++ b/src/checker.c @@ -2655,10 +2655,14 @@ CheckStatus check_constraint(AstConstraint *constraint) { } if (ic->expected_type_expr) { + cs = check_type(&ic->expected_type_expr); + if (cs == Check_Return_To_Symres || cs == Check_Yield_Macro) { + return cs; + } + ic->expected_type = type_build_from_ast(context.ast_alloc, ic->expected_type_expr); if (ic->expected_type == NULL) { - printf("WEIRD CONDITION THAT SHOULD NEVER HAPPEN!\n"); - return Check_Yield_Macro; + YIELD(ic->expected_type_expr->token->pos, "Waiting on expected type expression to be resolved."); } TYPE_CHECK(&ic->expr, ic->expected_type) { -- 2.25.1