mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 04:24:43 +00:00
Fix method call bug
This commit is contained in:
parent
a0b2917359
commit
aa2b45bf86
15 changed files with 106 additions and 101 deletions
|
@ -1070,16 +1070,16 @@ impl Context {
|
|||
let lhs = self.instantiate_t(*lhs, tmp_tv_ctx, loc)?;
|
||||
Ok(proj(lhs, rhs))
|
||||
}
|
||||
ProjMethod {
|
||||
ProjCall {
|
||||
lhs,
|
||||
method_name,
|
||||
attr_name,
|
||||
mut args,
|
||||
} => {
|
||||
let lhs = self.instantiate_tp(*lhs, tmp_tv_ctx, loc)?;
|
||||
for arg in args.iter_mut() {
|
||||
*arg = self.instantiate_tp(mem::take(arg), tmp_tv_ctx, loc)?;
|
||||
}
|
||||
Ok(proj_method(lhs, method_name, args))
|
||||
Ok(proj_call(lhs, attr_name, args))
|
||||
}
|
||||
Poly { name, mut params } => {
|
||||
for param in params.iter_mut() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue