aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorJasperGeer <jasper.geer@gmail.com>2022-09-04 16:17:29 -0400
committerJasperGeer <jasper.geer@gmail.com>2022-09-04 16:17:29 -0400
commit23d93f68463bd0f486f468075a767525c5be1a59 (patch)
tree457a52eb521525dbebbbbb3af00cdd7de71f6eec /src/check_expr.cpp
parent2e3dd8dd0b0af28d031f78791b738da514602f7b (diff)
Remove unnecessary or
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 c3528c859..a9a0b2235 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -7347,7 +7347,7 @@ ExprKind check_ternary_if_expr(CheckerContext *c, Operand *o, Ast *node, Type *t
check_expr_or_type(c, &x, te->x, type_hint);
node->viral_state_flags |= te->x->viral_state_flags;
- if (x.mode == Addressing_Type || x.mode == Addressing_Type) {
+ if (x.mode == Addressing_Type) {
gbString type_string = expr_to_string(x.expr);
error(node, "Type %s is invalid operand for ternary if expression", type_string);
gb_string_free(type_string);
@@ -7366,7 +7366,7 @@ ExprKind check_ternary_if_expr(CheckerContext *c, Operand *o, Ast *node, Type *t
return kind;
}
- if (y.mode == Addressing_Type || y.mode == Addressing_Type) {
+ if (y.mode == Addressing_Type) {
gbString type_string = expr_to_string(y.expr);
error(node, "Type %s is invalid operand for ternary if expression", type_string);
gb_string_free(type_string);