mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
Avoid panic in Params::loc
This commit is contained in:
parent
457e4bac76
commit
fda485cdf9
2 changed files with 2 additions and 2 deletions
|
@ -1610,7 +1610,7 @@ impl Locational for Params {
|
||||||
} else if !self.defaults.is_empty() {
|
} else if !self.defaults.is_empty() {
|
||||||
Location::concat(&self.defaults[0], self.defaults.last().unwrap())
|
Location::concat(&self.defaults[0], self.defaults.last().unwrap())
|
||||||
} else {
|
} else {
|
||||||
panic!()
|
Location::Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2959,7 +2959,7 @@ impl Locational for Params {
|
||||||
} else if !self.defaults.is_empty() {
|
} else if !self.defaults.is_empty() {
|
||||||
Location::concat(&self.defaults[0], self.defaults.last().unwrap())
|
Location::concat(&self.defaults[0], self.defaults.last().unwrap())
|
||||||
} else {
|
} else {
|
||||||
panic!()
|
Location::Unknown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue