subtype unification: dont allow trait types as subtypes
This commit is contained in:
parent
85f1e6384f
commit
c60d55adba
1 changed files with 5 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue