Add Type -- Runtime type for comparing types (similar to TypeInfo but simpler)

This commit is contained in:
Ginger Bill
2017-06-29 15:13:41 +01:00
parent d167290b28
commit 001baf4419
10 changed files with 167 additions and 40 deletions
+5 -1
View File
@@ -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;