diff --git a/crates/aiken-lang/src/expr.rs b/crates/aiken-lang/src/expr.rs index 65f7480c..dccc9aaa 100644 --- a/crates/aiken-lang/src/expr.rs +++ b/crates/aiken-lang/src/expr.rs @@ -365,7 +365,8 @@ impl TypedExpr { TypedExpr::BinOp { left, right, .. } => left .find_node(byte_index) - .or_else(|| right.find_node(byte_index)), + .or_else(|| right.find_node(byte_index)) + .or(Some(Located::Expression(self))), TypedExpr::Assignment { value, pattern, .. } => pattern .find_node(byte_index, &value.tipo()) diff --git a/crates/aiken-lang/src/tipo/expr.rs b/crates/aiken-lang/src/tipo/expr.rs index c542fb23..2c642ae4 100644 --- a/crates/aiken-lang/src/tipo/expr.rs +++ b/crates/aiken-lang/src/tipo/expr.rs @@ -1661,7 +1661,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> { .into_iter() .rev() .reduce(|acc, typed_expression| TypedExpr::BinOp { - location: Span::empty(), + location, tipo: bool(), name, left: typed_expression.into(),