mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
fix: codegen bug in CPython 3.7~3.10
This commit is contained in:
parent
83c57edf0e
commit
b7647c7f80
2 changed files with 5 additions and 1 deletions
|
@ -2799,7 +2799,9 @@ impl PyCodeGenerator {
|
|||
return self.emit_call_fake_method(obj, func_name, method_name, args);
|
||||
}
|
||||
let is_type = method_name.ref_t().is_poly_meta_type();
|
||||
let kind = if self.py_version.minor >= Some(11) || method_name.vi.t.is_method() {
|
||||
let kind = if self.py_version.minor >= Some(11)
|
||||
|| (method_name.vi.t.is_method() && args.kw_args.is_empty())
|
||||
{
|
||||
BoundAttr
|
||||
} else {
|
||||
UnboundAttr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue