Fix type insert error

This commit is contained in:
JanUlrich 2021-12-07 16:30:13 +01:00
parent d03231fd95
commit 0c79b40f2f

View File

@ -97,10 +97,14 @@ object InsertTypes {
typesWithoutBounds = typesWithoutBounds - TypeVariable(a)
Set(LessDot(GenericType(a), GenericType(g)))
}else Set()
case EqualsDot(TypeVariable(a), _) => if(linkedTypes.contains(TypeVariable(a))){
case EqualsDot(TypeVariable(a), RefType(_,_)) => if(linkedTypes.contains(TypeVariable(a))){
typesWithoutBounds = typesWithoutBounds - TypeVariable(a)
Set()
}else Set()
case EqualsDot(TypeVariable(a), TypeVariable(b)) => if(linkedTypes.contains(TypeVariable(a))){
typesWithoutBounds = typesWithoutBounds - TypeVariable(a)
Set(LessDot(GenericType(b), RefType("Object", List())))
}else Set()
case _ => Set()
}) ++ typesWithoutBounds.map(t => LessDot(t, RefType("Object", List())))
}