fix: There was a stack overflow due to passing unbound types to a function
This commit is contained in:
parent
1cab479b81
commit
534eb62a07
|
@ -531,6 +531,7 @@ impl TypeVar {
|
||||||
pub fn get_inner_types(&self) -> Vec<Rc<Type>> {
|
pub fn get_inner_types(&self) -> Vec<Rc<Type>> {
|
||||||
match self {
|
match self {
|
||||||
Self::Link { tipo } => tipo.get_inner_types(),
|
Self::Link { tipo } => tipo.get_inner_types(),
|
||||||
|
Self::Unbound { .. } => vec![],
|
||||||
var => {
|
var => {
|
||||||
vec![Type::Var {
|
vec![Type::Var {
|
||||||
tipo: RefCell::new(var.clone()).into(),
|
tipo: RefCell::new(var.clone()).into(),
|
||||||
|
|
|
@ -18,8 +18,5 @@ fn sum_list(list: List<Schema>) -> Int {
|
||||||
}
|
}
|
||||||
|
|
||||||
test foo() {
|
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
|
sum(List([List([Integer(1), Integer(2)]), Integer(3), Integer(4)])) == 10
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue