diff --git a/crates/erg_compiler/ty/mod.rs b/crates/erg_compiler/ty/mod.rs index a9bec0a6..f2e6b922 100644 --- a/crates/erg_compiler/ty/mod.rs +++ b/crates/erg_compiler/ty/mod.rs @@ -1956,6 +1956,7 @@ impl HasType for Type { impl HasLevel for Type { fn level(&self) -> Option { + println!("lev: {self}"); match self { Self::FreeVar(v) => v.level(), Self::Ref(t) => t.level(), @@ -2034,7 +2035,10 @@ impl HasLevel for Type { Some(min) } } - Self::Structural(ty) => ty.level(), + Self::Structural(ty) => { + set_recursion_limit!(None, 128); + ty.level() + } Self::Guard(guard) => guard.to.level(), Self::Quantified(quant) => quant.level(), Self::Bounded { sub, sup } => {