From 618847bf4f6745c5e8ed3aade572f9f4d549bba8 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 3 Mar 2015 16:59:00 +0100 Subject: [PATCH] Fehlende Umwandlung von RefType zu GTV in Wildcard-Types implementieren --- .../syntaxtree/type/ExtendsWildcardType.java | 7 +++++++ .../syntaxtree/type/SuperWildcardType.java | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index dfe0fdd1..00f0629f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -4,8 +4,10 @@ import java.util.Vector; import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; /** @@ -148,4 +150,9 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer, this.extendsType.parserPostProcessing(this); } + @Override + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent) { + this.extendsType = this.extendsType.TYPE(ass, parent).getType(); + return super.TYPE(ass, parent); + } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 3dea9599..e0e08303 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -3,8 +3,10 @@ package de.dhbwstuttgart.syntaxtree.type; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; +import de.dhbwstuttgart.typeinference.ConstraintType; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.ResultSet; +import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; /** * Stellt eine Wildcard mit unterer Grenze dar. @@ -144,4 +146,12 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I super.parserPostProcessing(parent); this.superType.parserPostProcessing(this); } + + @Override + public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent) { + this.superType = this.superType.TYPE(ass, parent).getType(); + return super.TYPE(ass, parent); + } + + }