diff --git a/src/de/dhbwstuttgart/syntaxtree/Method.java b/src/de/dhbwstuttgart/syntaxtree/Method.java index 6c0b07f5..abe7a104 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Method.java +++ b/src/de/dhbwstuttgart/syntaxtree/Method.java @@ -675,6 +675,15 @@ public class Method extends Field implements IItemWithOffset, TypeInsertable //Bei dem Elterntyp der Methode darf es sich nur um eine Klasse handeln, daher Cast ohne Prüfung: Class parentClass = (Class)parent; if(this.returntype == null)this.returntype = TypePlaceholder.fresh(this); + this.returntype.parserPostProcessing(this); + if(this.parameterlist != null){ + for(FormalParameter fp : this.parameterlist){ + fp.parserPostProcessing(this); + } + } + for(GenericTypeVar gtv : this.getGenericParameter()){ + gtv.parserPostProcessing(this); + } } @Override diff --git a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index 5a66e308..dfe0fdd1 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -142,4 +142,10 @@ public class ExtendsWildcardType extends WildcardType implements ITypeContainer, return ret; } + @Override + public void parserPostProcessing(SyntaxTreeNode parent) { + super.parserPostProcessing(parent); + this.extendsType.parserPostProcessing(this); + } + } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java index 229bfaeb..19664a0f 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/GenericTypeVar.java @@ -170,7 +170,7 @@ public class GenericTypeVar extends Type */ return new JavaCodeResult(this.name.toString()); } - + public TypePlaceholder getTypePlaceHolder(SyntaxTreeNode environment) { String hashValue = this.getName().toString()+environment.hashCode(); if(!GenericTypeVar.tph.containsKey(hashValue)){ diff --git a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java index 85ea2d9d..2c5d0e59 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -830,6 +830,14 @@ public class RefType extends Type implements IMatchable throw new TypeinferenceException("Der Typ "+this.getName()+" ist nicht korrekt", parent); return t; } + + @Override + public void parserPostProcessing(SyntaxTreeNode parent) { + super.parserPostProcessing(parent); + if(this.parameter != null)for(Type param : this.parameter){ + param.parserPostProcessing(this); + } + } } // ino.end diff --git a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 7a730da6..3dea9599 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -138,4 +138,10 @@ public class SuperWildcardType extends WildcardType implements ITypeContainer, I ret.addAll(this.superType.getInvolvedTypePlaceholder()); return ret; } + + @Override + public void parserPostProcessing(SyntaxTreeNode parent) { + super.parserPostProcessing(parent); + this.superType.parserPostProcessing(this); + } } diff --git a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java index 4679dc62..aa32de77 100755 --- a/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java +++ b/src/de/dhbwstuttgart/syntaxtree/type/WildcardType.java @@ -89,5 +89,7 @@ public class WildcardType extends Type{ return false; } } + + } diff --git a/src/de/dhbwstuttgart/typeinference/FunNMethod.java b/src/de/dhbwstuttgart/typeinference/FunNMethod.java index 7d1d7d51..9ea83dc0 100644 --- a/src/de/dhbwstuttgart/typeinference/FunNMethod.java +++ b/src/de/dhbwstuttgart/typeinference/FunNMethod.java @@ -33,7 +33,7 @@ public class FunNMethod extends Method{ } pl.formalparameter = fpList; this.parameterlist = pl; - this.parent = new Class("Fun"+paralist.size(), 0); + this.parserPostProcessing(new Class("Fun"+paralist.size(), 0)); } public FunNMethod(int N){ @@ -51,7 +51,7 @@ public class FunNMethod extends Method{ } pl.formalparameter = fpList; this.parameterlist = pl; - this.parent = new Class("Fun"+N, 0); + this.parserPostProcessing(new Class("Fun"+N, 0)); } @Override