mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 02:39:20 +00:00
fix: add set_recursion_limit!
This commit is contained in:
parent
de3b3a467b
commit
73f8be7ae1
5 changed files with 52 additions and 16 deletions
|
@ -7,7 +7,7 @@ use erg_common::dict::Dict;
|
|||
use erg_common::set::Set;
|
||||
use erg_common::style::colors::DEBUG_ERROR;
|
||||
use erg_common::traits::StructuralEq;
|
||||
use erg_common::{assume_unreachable, log};
|
||||
use erg_common::{assume_unreachable, log, set_recursion_limit};
|
||||
use erg_common::{Str, Triple};
|
||||
|
||||
use crate::context::eval::UndoableLinkedList;
|
||||
|
@ -126,6 +126,7 @@ impl Context {
|
|||
|
||||
/// lhs :> rhs ?
|
||||
pub(crate) fn supertype_of(&self, lhs: &Type, rhs: &Type) -> bool {
|
||||
set_recursion_limit!(false, 128);
|
||||
let res = match Self::cheap_supertype_of(lhs, rhs) {
|
||||
(Absolutely, judge) => judge,
|
||||
(Maybe, judge) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue