subtype unification: dont allow trait types as subtypes

This commit is contained in:
Michael Sippel 2025-02-25 22:56:12 +01:00
parent 85f1e6384f
commit c60d55adba

View file

@ -92,16 +92,19 @@ impl UnificationProblem {
},
(t, TypeTerm::Ladder(mut a1)) => {
if let Ok(mut halo) = self.eval_subtype( t.clone(), a1.first().unwrap().clone(), addr.clone() ) {
/*
if let Ok(mut halo) = self.eval_subtype( t.clone(), a1.first().unwrap().clone(), addr.clone() )
a1.append(&mut halo);
Ok(a1)
} else {
*/
Err(UnificationError{ addr, t1: t, t2: TypeTerm::Ladder(a1) })
}
//}
}
(TypeTerm::Ladder(mut a1), t) => {
if let Ok(mut halo) = self.eval_subtype( a1.pop().unwrap(), t.clone(), addr.clone() ) {
a1.append(&mut halo);
Ok(a1)
} else {