mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 10:49:54 +00:00
fix: inherited class constructor
This commit is contained in:
parent
056469b18c
commit
ceb6121a67
2 changed files with 1 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue