mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Fix bug in chained boolean typecheck (#490)
This commit is contained in:
@ -3018,7 +3018,6 @@ pub fn parse_math_expression(
|
||||
ty: result_ty,
|
||||
custom_completion: None,
|
||||
});
|
||||
// }
|
||||
}
|
||||
expr_stack.push(op);
|
||||
expr_stack.push(rhs);
|
||||
|
@ -131,7 +131,7 @@ pub fn math_result_type(
|
||||
}
|
||||
},
|
||||
Operator::And | Operator::Or => match (&lhs.ty, &rhs.ty) {
|
||||
(Type::Bool, Type::Bool) => (Type::Int, None),
|
||||
(Type::Bool, Type::Bool) => (Type::Bool, None),
|
||||
|
||||
(Type::Unknown, _) => (Type::Unknown, None),
|
||||
(_, Type::Unknown) => (Type::Unknown, None),
|
||||
|
Reference in New Issue
Block a user