diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-06-29 15:13:41 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-06-29 15:13:41 +0100 |
| commit | 001baf4419da9c43d4ef68d7ec1eac638d6fb742 (patch) | |
| tree | 5d685a869cee84487a860e616034ed1e2428f50d /src/check_stmt.cpp | |
| parent | d167290b280c2dfcb764ff1e8f48df975444962d (diff) | |
Add `Type` -- Runtime type for comparing types (similar to TypeInfo but simpler)
Diffstat (limited to 'src/check_stmt.cpp')
| -rw-r--r-- | src/check_stmt.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/check_stmt.cpp b/src/check_stmt.cpp index 1b94e8ade..8cbbf4c25 100644 --- a/src/check_stmt.cpp +++ b/src/check_stmt.cpp @@ -1297,7 +1297,11 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) { check_comparison(c, &a1, &b1, op); } else { Operand y = {}; - check_expr(c, &y, expr); + if (is_operand_a_type_value(x)) { + check_expr_or_type(c, &y, expr); + } else { + check_expr(c, &y, expr); + } if (x.mode == Addressing_Invalid || y.mode == Addressing_Invalid) { continue; |