aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-07-10 23:15:41 +0100
committerGinger Bill <bill@gingerbill.org>2017-07-10 23:15:41 +0100
commit3868a9a0f00185b6f8f587f67a62cbd12a215336 (patch)
tree70cb3e1b28ace5e2770f4b8747071b3eab24032d /src/check_expr.cpp
parentba5050ac7c2eb116b8989b7d387e67eb79eec62a (diff)
Clean up _preload.odin types
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index d135cf3dd..fab388d9f 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -6837,14 +6837,14 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t
o->type = t;
o->mode = Addressing_OptionalOk;
- } else if (is_type_any(o->type)) {
+ } else if (is_type_any(src)) {
o->type = t;
o->mode = Addressing_OptionalOk;
add_type_info_type(c, o->type);
add_type_info_type(c, t);
} else {
- error(o->expr, "Type assertions can only operate on unions");
+ error(o->expr, "Type assertions can only operate on unions and `any`");
o->mode = Addressing_Invalid;
o->expr = node;
return kind;