mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
feat: add as
operator
This commit is contained in:
parent
1c6a6b2ec8
commit
daf01f3cf2
14 changed files with 119 additions and 12 deletions
|
@ -482,6 +482,11 @@ pub fn subtypeof(sup: Type) -> Constraint {
|
|||
Constraint::new_sandwiched(Type::Never, sup)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn supertypeof(sub: Type) -> Constraint {
|
||||
Constraint::new_sandwiched(sub, Type::Obj)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn mono_q_tp<S: Into<Str>>(name: S, constr: Constraint) -> TyParam {
|
||||
TyParam::mono_q(name, constr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue