mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
feat: best-effort type instantiation
This commit is contained in:
parent
f6ea1d1d79
commit
1f88084360
13 changed files with 2203 additions and 865 deletions
|
@ -1218,7 +1218,7 @@ pub(crate) fn filter_func(mut args: ValueArgs, ctx: &Context) -> EvalValueResult
|
|||
return Err(type_mismatch("Bool", tp, "func"));
|
||||
}
|
||||
},
|
||||
Err(mut err) => {
|
||||
Err((_res, mut err)) => {
|
||||
return Err(EvalValueError::from(*err.remove(0).core));
|
||||
}
|
||||
}
|
||||
|
@ -1272,7 +1272,7 @@ pub(crate) fn map_func(mut args: ValueArgs, ctx: &Context) -> EvalValueResult<Ty
|
|||
Ok(res) => {
|
||||
mapped.push(res);
|
||||
}
|
||||
Err(mut err) => {
|
||||
Err((_res, mut err)) => {
|
||||
return Err(EvalValueError::from(*err.remove(0).core));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue