From cb9380f3aa8208f07397cbf75eb5f727b47881b4 Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Mon, 16 Sep 2024 21:59:22 +0900 Subject: [PATCH] Update mod.rs --- crates/erg_compiler/ty/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 } => {