fix: inherited class constructor

This commit is contained in:
Shunsuke Shibayama 2024-07-24 14:33:03 +09:00
parent 056469b18c
commit ceb6121a67
2 changed files with 1 additions and 2 deletions

View file

@ -2086,7 +2086,7 @@ impl Context {
if let Some(call_vi) =
typ_ctx.get_current_scope_var(&VarName::from_static("__call__"))
{
if call_vi.vis.is_private() {
if ERG_MODE && call_vi.vis.is_private() {
self.validate_visibility(
&Identifier::private_with_loc("__call__".into(), obj.loc()),
call_vi,

View file

@ -1769,7 +1769,6 @@ impl Context {
ctx.get_class_attr(&VarName::from_static("__call__"), ctx)
})
.and_then(|vi| vi.t.param_ts().first().cloned())
.or(param_t.cloned())
};
let new_t = if let Some(t) = param_t {
func1(t, gen.typ().clone())