mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
Fix method call bug
This commit is contained in:
parent
a0b2917359
commit
aa2b45bf86
15 changed files with 106 additions and 101 deletions
|
@ -1020,7 +1020,7 @@ impl Context {
|
|||
let dict_getitem_t = fn1_met(
|
||||
dict_t.clone(),
|
||||
mono_q("T"),
|
||||
proj_method(mono_q_tp("D"), "__getitem__", vec![ty_tp(mono_q("T"))]),
|
||||
proj_call(mono_q_tp("D"), "__getitem__", vec![ty_tp(mono_q("T"))]),
|
||||
);
|
||||
let dict_getitem_t = quant(
|
||||
dict_getitem_t,
|
||||
|
@ -1057,7 +1057,7 @@ impl Context {
|
|||
tuple_.register_superclass(mono("GenericTuple"), &generic_tuple);
|
||||
tuple_.register_marker_trait(poly("Output", vec![ty_tp(mono_q("Ts"))]));
|
||||
// __Tuple_getitem__: (self: Tuple(Ts), _: {N}) -> Ts[N]
|
||||
let return_t = proj_method(mono_q_tp("Ts"), "__getitem__", vec![mono_q_tp("N")]);
|
||||
let return_t = proj_call(mono_q_tp("Ts"), "__getitem__", vec![mono_q_tp("N")]);
|
||||
let tuple_getitem_t = fn1_met(
|
||||
tuple_t.clone(),
|
||||
tp_enum(Nat, set! {mono_q_tp("N")}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue