Fix method call bug

This commit is contained in:
Shunsuke Shibayama 2022-10-13 00:56:43 +09:00
parent a0b2917359
commit aa2b45bf86
15 changed files with 106 additions and 101 deletions

View file

@ -1462,8 +1462,8 @@ impl CodeGenerator {
fn emit_call(&mut self, call: Call) {
log!(info "entered {} ({call})", fn_name!());
if let Some(method_name) = call.method_name {
self.emit_call_method(*call.obj, method_name, call.args);
if let Some(attr_name) = call.attr_name {
self.emit_call_method(*call.obj, attr_name, call.args);
} else {
match *call.obj {
Expr::Accessor(Accessor::Ident(ident)) if ident.vis().is_private() => {