From 0c79b40f2f9d56988426d9c442e88d65de1dbcf7 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 7 Dec 2021 16:30:13 +0100 Subject: [PATCH] Fix type insert error --- src/main/scala/hb/dhbw/InsertTypes.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/scala/hb/dhbw/InsertTypes.scala b/src/main/scala/hb/dhbw/InsertTypes.scala index a6b72c3..de6a50f 100644 --- a/src/main/scala/hb/dhbw/InsertTypes.scala +++ b/src/main/scala/hb/dhbw/InsertTypes.scala @@ -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()))) }