From 77be216ee51a78bd83bee581ec00247e0742dd9d Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 21 Mar 2018 11:15:59 +0100 Subject: [PATCH] Fix --- .../typeinference/assumptions/FieldAssumption.java | 5 +++-- .../typeinference/assumptions/MethodAssumption.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java index 62867a26..e039dcbe 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/FieldAssumption.java @@ -1,5 +1,6 @@ package de.dhbwstuttgart.typeinference.assumptions; +import de.dhbwstuttgart.exceptions.NotImplementedException; import de.dhbwstuttgart.syntaxtree.ClassOrInterface; import de.dhbwstuttgart.syntaxtree.TypeScope; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; @@ -25,7 +26,7 @@ public class FieldAssumption extends Assumption{ } public RefTypeOrTPHOrWildcardOrGeneric getReceiverType(GenericsResolver resolver) { - - return null; + //TODO + throw new NotImplementedException(); } } diff --git a/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java index 4656318c..e17281e5 100644 --- a/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java +++ b/src/de/dhbwstuttgart/typeinference/assumptions/MethodAssumption.java @@ -37,7 +37,8 @@ public class MethodAssumption extends Assumption{ return receiver; } - public RefTypeOrTPHOrWildcardOrGeneric getReturnType() { + public RefTypeOrTPHOrWildcardOrGeneric getReturnType(GenericsResolver resolver) { + if(retType instanceof GenericRefType)return resolver.resolve(retType); return retType; }