mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 20:14:45 +00:00
Update mod.rs
This commit is contained in:
parent
fd76f56ba4
commit
cb9380f3aa
1 changed files with 5 additions and 1 deletions
|
@ -1956,6 +1956,7 @@ impl HasType for Type {
|
||||||
|
|
||||||
impl HasLevel for Type {
|
impl HasLevel for Type {
|
||||||
fn level(&self) -> Option<usize> {
|
fn level(&self) -> Option<usize> {
|
||||||
|
println!("lev: {self}");
|
||||||
match self {
|
match self {
|
||||||
Self::FreeVar(v) => v.level(),
|
Self::FreeVar(v) => v.level(),
|
||||||
Self::Ref(t) => t.level(),
|
Self::Ref(t) => t.level(),
|
||||||
|
@ -2034,7 +2035,10 @@ impl HasLevel for Type {
|
||||||
Some(min)
|
Some(min)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Self::Structural(ty) => ty.level(),
|
Self::Structural(ty) => {
|
||||||
|
set_recursion_limit!(None, 128);
|
||||||
|
ty.level()
|
||||||
|
}
|
||||||
Self::Guard(guard) => guard.to.level(),
|
Self::Guard(guard) => guard.to.level(),
|
||||||
Self::Quantified(quant) => quant.level(),
|
Self::Quantified(quant) => quant.level(),
|
||||||
Self::Bounded { sub, sup } => {
|
Self::Bounded { sub, sup } => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue