From 18b468547d107ea674f678ffdefd4a6776d82e34 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Tue, 5 Aug 2014 17:57:23 +0200 Subject: [PATCH] RefTypes kontrollieren bei checkType nun auch Parameterliste --- src/mycompiler/mytype/RefType.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/mycompiler/mytype/RefType.java b/src/mycompiler/mytype/RefType.java index cfa3b006f..9e1ec0c21 100755 --- a/src/mycompiler/mytype/RefType.java +++ b/src/mycompiler/mytype/RefType.java @@ -8,6 +8,7 @@ import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; +import mycompiler.IItemWithOffset; import mycompiler.mybytecode.JVMCode; import mycompiler.myclass.UsedId; import mycompiler.myexception.SCException; @@ -21,10 +22,13 @@ import org.apache.log4j.Logger; + import sun.reflect.generics.reflectiveObjects.NotImplementedException; import typinferenz.JavaCodeResult; import typinferenz.ResultSet; import typinferenz.TypeInsertable; +import typinferenz.assumptions.TypeAssumptions; +import typinferenz.exceptions.TypeinferenceException; @@ -780,6 +784,18 @@ public class RefType extends Type implements IMatchable } return ret; } + + @Override + public Type checkType(TypeAssumptions ass, IItemWithOffset parent){ + //Der RefType muss zusätzlich seine Parameter prüfen. + Vector parameterList = new Vector<>(); + if(this.parameter!=null)for(Type param : this.parameter){ + parameterList.add(param.checkType(ass, parent)); + } + this.parameter = parameterList; + Type t = super.checkType(ass,parent); + return t; + } } // ino.end