fix(lsp): when desugaring and/or chains we should use the whole span of the chain for the generated BinOp locations
This commit is contained in:
parent
7015a9badc
commit
832ca81a8c
|
@ -365,7 +365,8 @@ impl TypedExpr {
|
||||||
|
|
||||||
TypedExpr::BinOp { left, right, .. } => left
|
TypedExpr::BinOp { left, right, .. } => left
|
||||||
.find_node(byte_index)
|
.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
|
TypedExpr::Assignment { value, pattern, .. } => pattern
|
||||||
.find_node(byte_index, &value.tipo())
|
.find_node(byte_index, &value.tipo())
|
||||||
|
|
|
@ -1661,7 +1661,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.rev()
|
.rev()
|
||||||
.reduce(|acc, typed_expression| TypedExpr::BinOp {
|
.reduce(|acc, typed_expression| TypedExpr::BinOp {
|
||||||
location: Span::empty(),
|
location,
|
||||||
tipo: bool(),
|
tipo: bool(),
|
||||||
name,
|
name,
|
||||||
left: typed_expression.into(),
|
left: typed_expression.into(),
|
||||||
|
|
Loading…
Reference in New Issue