aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-07-10 11:08:51 +0100
committergingerBill <bill@gingerbill.org>2021-07-10 11:08:51 +0100
commite692efbe097ebb3fc7925620e0dc4fd736d67ee4 (patch)
treef0ecb9f7d0013c11c7675927c39bd273ba407a86 /src/checker.cpp
parentf6c1a5bf6ebcac144c96c965b0895bb91a5b6b7a (diff)
Improve update expr type semantics for ternary expressions
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp7
1 files changed, 7 insertions, 0 deletions
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);
}
}