From e692efbe097ebb3fc7925620e0dc4fd736d67ee4 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 10 Jul 2021 11:08:51 +0100 Subject: Improve update expr type semantics for ternary expressions --- src/checker.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/checker.cpp') diff --git a/src/checker.cpp b/src/checker.cpp index d93618ef5..05e7c9d4b 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -4427,6 +4427,13 @@ void check_parsed_files(Checker *c) { if (is_type_typed(info->type)) { compiler_error("%s (type %s) is typed!", expr_to_string(expr), type_to_string(info->type)); } + if (info->mode == Addressing_Constant) { + } else if (info->type == t_untyped_nil) { + } else if (info->type == t_untyped_undef) { + } else if (info->type == t_untyped_bool) { + } else { + gb_printf_err("UNTYPED %s %s\n", expr_to_string(expr), type_to_string(info->type)); + } add_type_and_value(&c->info, expr, info->mode, info->type, info->value); } } -- cgit v1.2.3