aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-12-15 21:46:27 +0000
committergingerBill <bill@gingerbill.org>2018-12-15 21:46:27 +0000
commit1ce90b2166747d374e140f2d7cad0a5749fbb11d (patch)
tree6be092c27592e6f6268b935a8baaece7ae7eb529 /src/check_expr.cpp
parent9d6666f333cd427a720c639ee0b9b513d79fe8a0 (diff)
Remove weird bit_set shorthand; Add extra type hinting
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 1e487fb00..231b5dd3f 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -2109,7 +2109,7 @@ void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, bool use_lhs_as
case Token_NotEq: {
// NOTE(bill): Allow comparisons between types
check_expr_or_type(c, x, be->left);
- check_expr_or_type(c, y, be->right);
+ check_expr_or_type(c, y, be->right, x->type);
bool xt = x->mode == Addressing_Type;
bool yt = y->mode == Addressing_Type;
// If only one is a type, this is an error
@@ -6194,7 +6194,7 @@ ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast *node, Type
case_ast_node(be, BinaryExpr, node);
- check_binary_expr(c, o, node);
+ check_binary_expr(c, o, node, true);
if (o->mode == Addressing_Invalid) {
o->expr = node;
return kind;