aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-02 22:03:52 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-02 22:03:52 +0100
commit382a5ca6a27ea0f6dde4c0783d55f5dca8ac2575 (patch)
treefc7b7592651b166bdbbf7334649b062d584231e9 /src/check_expr.c
parent96e8bb5b6f3c8d2cf2b0fae8c7a9c710c4e9dbb0 (diff)
Update and regression test old demos
Diffstat (limited to 'src/check_expr.c')
-rw-r--r--src/check_expr.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/check_expr.c b/src/check_expr.c
index 797295c0f..5370f76b3 100644
--- a/src/check_expr.c
+++ b/src/check_expr.c
@@ -249,12 +249,10 @@ void check_assignment(Checker *c, Operand *operand, Type *type, String context_n
operand->mode = Addressing_Invalid;
return;
}
- if (is_type_any(type)) {
- target_type = t_any;
- } else {
- target_type = default_type(operand->type);
+ target_type = default_type(operand->type);
+ if (!is_type_any(type)) {
+ GB_ASSERT_MSG(is_type_typed(target_type), "%s", type_to_string(type));
}
- GB_ASSERT_MSG(is_type_typed(target_type), "%s", type_to_string(type));
add_type_info_type(c, type);
add_type_info_type(c, target_type);
}