From 56f69727ebde6b34f4db35a69a31787ffd10be8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Tue, 3 Feb 2015 12:25:45 +0100 Subject: [PATCH] In Unify.greater1 alle Bounds einer BGTV als groesserer Typ hinzugefuegt --- src/de/dhbwstuttgart/typeinference/unify/Unify.java | 6 ++++++ test/plugindevelopment/TypeInsertTests/GenericVarTest3.jav | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index bd2b38e65..92dd8e566 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -3014,6 +3014,12 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.: } } } + else if(T instanceof BoundedGenericTypeVar) //PL 15-02-03 angefuegt da BGTV Kleiner als alle seine Bounds ist + { + BoundedGenericTypeVar bgtv = (BoundedGenericTypeVar)T; + Vector types = bgtv.getBounds(); + retVec = types.stream().map(ty -> greater(ty, fc_tto)).reduce(new Vector(), (a,b) -> { a.addAll(b); return a;}); + } return retVec; } diff --git a/test/plugindevelopment/TypeInsertTests/GenericVarTest3.jav b/test/plugindevelopment/TypeInsertTests/GenericVarTest3.jav index 06b4a32da..fef13c403 100644 --- a/test/plugindevelopment/TypeInsertTests/GenericVarTest3.jav +++ b/test/plugindevelopment/TypeInsertTests/GenericVarTest3.jav @@ -2,7 +2,7 @@ class GenericTest{ A method(){ A x; Integer integer; - x = integer; + integer = x; return x; } }