fix: dynamic type checking bugs

This commit is contained in:
Shunsuke Shibayama 2023-08-19 16:34:07 +09:00
parent a6b72ea636
commit 5affa5065f
12 changed files with 91 additions and 7 deletions

View file

@ -999,6 +999,13 @@ impl Context {
type_.register_superclass(Obj, &obj);
type_.register_builtin_erg_impl(
FUNC_MRO,
fn0_met(Type, array_t(Type, TyParam::erased(Nat))),
Immutable,
Visibility::BUILTIN_PUBLIC,
);
// TODO: PolyType
type_.register_builtin_erg_impl(
FUNDAMENTAL_ARGS,
array_t(Type, TyParam::erased(Nat)),
Immutable,
Visibility::BUILTIN_PUBLIC,

View file

@ -402,6 +402,7 @@ const OP_MUTATE: &str = "__mutate__";
const OP_POS: &str = "__pos__";
const OP_NEG: &str = "__neg__";
const FUNDAMENTAL_ARGS: &str = "__args__";
const FUNDAMENTAL_LEN: &str = "__len__";
const FUNDAMENTAL_CONTAINS: &str = "__contains__";
const FUNDAMENTAL_CALL: &str = "__call__";