ensure Operator::And errors out with incompatible types (#6638)

This commit is contained in:
pwygab
2022-09-29 19:17:21 +08:00
committed by GitHub
parent 7b9ad9d2e5
commit f5e1b08e6a
2 changed files with 5 additions and 1 deletions

View File

@ -408,7 +408,7 @@ pub fn eval_expression(
match op {
Operator::And => {
if !lhs.is_true() {
if lhs.is_false() {
Ok(Value::Bool {
val: false,
span: expr.span,