mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
Add Location::unknown_or
This commit is contained in:
parent
de39186103
commit
c8b161842a
2 changed files with 18 additions and 2 deletions
|
@ -262,7 +262,9 @@ impl Context {
|
|||
match subr {
|
||||
ConstSubr::User(_user) => todo!(),
|
||||
ConstSubr::Builtin(builtin) => builtin.call(args, self).map_err(|mut e| {
|
||||
e.0.loc = loc;
|
||||
if e.0.loc.is_unknown() {
|
||||
e.0.loc = loc;
|
||||
}
|
||||
EvalErrors::from(EvalError::new(
|
||||
*e.0,
|
||||
self.cfg.input.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue