mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
Implement Range
This commit is contained in:
parent
81726a0142
commit
ff1ead75ff
2 changed files with 94 additions and 1 deletions
|
@ -1441,7 +1441,8 @@ impl Context {
|
|||
/* Range */
|
||||
let range_t = builtin_poly("Range", vec![TyParam::t(mono_q("T"))]);
|
||||
let mut range = Self::builtin_poly_class("Range", vec![PS::t_nd("T")], 2);
|
||||
range.register_superclass(Obj, &obj);
|
||||
// range.register_superclass(Obj, &obj);
|
||||
range.register_superclass(Type, &type_);
|
||||
range.register_marker_trait(builtin_poly("Output", vec![ty_tp(mono_q("T"))]));
|
||||
let mut range_eq = Self::builtin_methods("Eq", 2);
|
||||
range_eq.register_builtin_impl(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue