mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove unnecessary or
This commit is contained in:
+2
-2
@@ -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);
|
check_expr_or_type(c, &x, te->x, type_hint);
|
||||||
node->viral_state_flags |= te->x->viral_state_flags;
|
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);
|
gbString type_string = expr_to_string(x.expr);
|
||||||
error(node, "Type %s is invalid operand for ternary if expression", type_string);
|
error(node, "Type %s is invalid operand for ternary if expression", type_string);
|
||||||
gb_string_free(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;
|
return kind;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (y.mode == Addressing_Type || y.mode == Addressing_Type) {
|
if (y.mode == Addressing_Type) {
|
||||||
gbString type_string = expr_to_string(y.expr);
|
gbString type_string = expr_to_string(y.expr);
|
||||||
error(node, "Type %s is invalid operand for ternary if expression", type_string);
|
error(node, "Type %s is invalid operand for ternary if expression", type_string);
|
||||||
gb_string_free(type_string);
|
gb_string_free(type_string);
|
||||||
|
|||||||
Reference in New Issue
Block a user