fix: forgot to handle None case for other_fun in validator
This commit is contained in:
parent
1503b525b2
commit
c50d4d1396
|
@ -427,12 +427,6 @@ impl TypedDefinition {
|
||||||
// Note that the fn span covers the function head, not
|
// Note that the fn span covers the function head, not
|
||||||
// the entire statement.
|
// the entire statement.
|
||||||
match self {
|
match self {
|
||||||
Definition::Fn(Function { body, .. }) | Definition::Test(Function { body, .. }) => {
|
|
||||||
if let Some(located) = body.find_node(byte_index) {
|
|
||||||
return Some(located);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Definition::Validator(Validator {
|
Definition::Validator(Validator {
|
||||||
fun: Function { body, .. },
|
fun: Function { body, .. },
|
||||||
other_fun:
|
other_fun:
|
||||||
|
@ -450,6 +444,17 @@ impl TypedDefinition {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Definition::Fn(Function { body, .. })
|
||||||
|
| Definition::Test(Function { body, .. })
|
||||||
|
| Definition::Validator(Validator {
|
||||||
|
fun: Function { body, .. },
|
||||||
|
..
|
||||||
|
}) => {
|
||||||
|
if let Some(located) = body.find_node(byte_index) {
|
||||||
|
return Some(located);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_ => (),
|
_ => (),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue