From 534eb62a076fea478e457d6ecce8d8d817b601d4 Mon Sep 17 00:00:00 2001 From: microproofs Date: Mon, 25 Sep 2023 13:05:27 -0400 Subject: [PATCH] fix: There was a stack overflow due to passing unbound types to a function --- crates/aiken-lang/src/tipo.rs | 1 + examples/acceptance_tests/066/lib/tests.ak | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/aiken-lang/src/tipo.rs b/crates/aiken-lang/src/tipo.rs index 5eaf7fa6..79f03902 100644 --- a/crates/aiken-lang/src/tipo.rs +++ b/crates/aiken-lang/src/tipo.rs @@ -531,6 +531,7 @@ impl TypeVar { pub fn get_inner_types(&self) -> Vec> { match self { Self::Link { tipo } => tipo.get_inner_types(), + Self::Unbound { .. } => vec![], var => { vec![Type::Var { tipo: RefCell::new(var.clone()).into(), diff --git a/examples/acceptance_tests/066/lib/tests.ak b/examples/acceptance_tests/066/lib/tests.ak index 69e69e01..6e3187fc 100644 --- a/examples/acceptance_tests/066/lib/tests.ak +++ b/examples/acceptance_tests/066/lib/tests.ak @@ -18,8 +18,5 @@ fn sum_list(list: List) -> Int { } test foo() { - // False - // Can't enable the "real" test because it puts the UPLC evaluator in an infinite loop. - // - sum(List([List([Integer(1), Integer(2)]), Integer(3), Integer(4)])) == 10 }