From 615d2c633e89d561035f2c6502a60b491f115aa6 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 23 Jan 2015 13:31:52 +0100 Subject: [PATCH] Fehler beheben --- src/de/dhbwstuttgart/typeinference/FunNMethod.java | 3 +++ .../typeinference/typedeployment/TypeInsertSet.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java index cf056020e..7d1d7d51d 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -3,6 +3,7 @@ package de.dhbwstuttgart.typeinference; import java.util.Vector; import de.dhbwstuttgart.syntaxtree.FormalParameter; +import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.Method; import de.dhbwstuttgart.syntaxtree.ParameterList; import de.dhbwstuttgart.syntaxtree.misc.DeclId; @@ -32,6 +33,7 @@ public class FunNMethod extends Method{ } pl.formalparameter = fpList; this.parameterlist = pl; + this.parent = new Class("Fun"+paralist.size(), 0); } public FunNMethod(int N){ @@ -49,6 +51,7 @@ public class FunNMethod extends Method{ } pl.formalparameter = fpList; this.parameterlist = pl; + this.parent = new Class("Fun"+N, 0); } @Override diff --git a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java index 40f7211e3..4c33c7ad5 100644 --- a/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java +++ b/src/de/dhbwstuttgart/typeinference/typedeployment/TypeInsertSet.java @@ -77,14 +77,14 @@ public class TypeInsertSet { GenericVarPatch gPatch = new GenericVarPatch();//Set der Einzusetzenden generischen Variablendeklarationen //Schritt 1: Vector involvedTPHs = tip.getInsertType().getInvolvedTypePlaceholder();//.getInvolvedTypePlaceholder(); - /* + //Schritt 2: Vector pairs = new Vector<>(); for(Pair pair : this.resultSet.getConstraintsFor(involvedTPHs)){ //gPatch.add(pair); //Schritt 6 (Teil 2) pairs.add(pair); } - */ + //Schritt 3: Vector allTPHs = new Vector<>(); for(TypePlaceholder tph : involvedTPHs){ @@ -102,7 +102,7 @@ public class TypeInsertSet { } */ - //gPatch.addPairs(pairs); + gPatch.addPairs(pairs); gPatch.addTPHs(allTPHs); /*