Fehlende Umwandlung von RefType zu GTV in Wildcard-Types implementieren

This commit is contained in:
JanUlrich 2015-03-03 16:59:00 +01:00
parent 0674de12c6
commit 618847bf4f
2 changed files with 17 additions and 0 deletions

View File

@ -4,8 +4,10 @@ import java.util.Vector;
import de.dhbwstuttgart.parser.JavaClassName; import de.dhbwstuttgart.parser.JavaClassName;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.typeinference.ConstraintType;
import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.JavaCodeResult;
import de.dhbwstuttgart.typeinference.ResultSet; 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); 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);
}
} }

View File

@ -3,8 +3,10 @@ package de.dhbwstuttgart.syntaxtree.type;
import java.util.Vector; import java.util.Vector;
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
import de.dhbwstuttgart.typeinference.ConstraintType;
import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.JavaCodeResult;
import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.ResultSet;
import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
/** /**
* Stellt eine Wildcard mit unterer Grenze dar. * Stellt eine Wildcard mit unterer Grenze dar.
@ -144,4 +146,12 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I
super.parserPostProcessing(parent); super.parserPostProcessing(parent);
this.superType.parserPostProcessing(this); 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);
}
} }