From 92ef0f499143895a944f6ce8e8426cf0f3b7f4ce Mon Sep 17 00:00:00 2001 From: Andreas Stadelmeier Date: Fri, 3 Dec 2021 01:13:49 +0100 Subject: [PATCH] FC transitive types added --- src/main/scala/hb/dhbw/FiniteClosure.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/scala/hb/dhbw/FiniteClosure.scala b/src/main/scala/hb/dhbw/FiniteClosure.scala index c1eb6c7..daaa3e4 100644 --- a/src/main/scala/hb/dhbw/FiniteClosure.scala +++ b/src/main/scala/hb/dhbw/FiniteClosure.scala @@ -20,8 +20,7 @@ class FiniteClosure(val extendsRelations : Set[(UnifyRefType, UnifyRefType)]){ } private def transitiveTypes(of: Set[(UnifyRefType, UnifyRefType)]) ={ val ref = Set.newBuilder[(UnifyRefType, UnifyRefType)] - ref ++= of.map(pair => (pair._1, pair._1)) - ref ++= of.map(pair => (pair._2, pair._2)) + ref ++= of.flatMap(pair => of.filter(p => p._1.eq(pair._2))) ref.result() } private def superClassTypes(of: UnifyRefType) = {