diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java b/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java index 72097fc0..00788b63 100644 --- a/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java @@ -1,5 +1,6 @@ package de.dhbwstuttgart.syntaxtree; +import com.sun.org.apache.xpath.internal.operations.Mod; import de.dhbwstuttgart.core.IItemWithOffset; import de.dhbwstuttgart.exceptions.DebugException; import de.dhbwstuttgart.parser.scope.JavaClassName; @@ -12,6 +13,7 @@ import de.dhbwstuttgart.typeinference.constraints.ConstraintSet; import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation; import org.antlr.v4.runtime.Token; +import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -33,6 +35,7 @@ public class ClassOrInterface extends SyntaxTreeNode implements TypeScope{ public ClassOrInterface(int modifiers, JavaClassName name, List fielddecl, List methods, List constructors, GenericDeclarationList genericClassParameters, RefType superClass, Boolean isInterface, List implementedInterfaces, Token offset){ super(offset); + if(isInterface && !Modifier.isInterface(modifiers))modifiers += Modifier.INTERFACE; this.modifiers = modifiers; this.name = name; this.fields = fielddecl;