forked from JavaTX/JavaCompilerCore
ClassOrInterface muss im Modifier INTERFACE haben, wenn isInterface gesetzt ist
This commit is contained in:
parent
35d5fb2f03
commit
832623a738
@ -1,5 +1,6 @@
|
|||||||
package de.dhbwstuttgart.syntaxtree;
|
package de.dhbwstuttgart.syntaxtree;
|
||||||
|
|
||||||
|
import com.sun.org.apache.xpath.internal.operations.Mod;
|
||||||
import de.dhbwstuttgart.core.IItemWithOffset;
|
import de.dhbwstuttgart.core.IItemWithOffset;
|
||||||
import de.dhbwstuttgart.exceptions.DebugException;
|
import de.dhbwstuttgart.exceptions.DebugException;
|
||||||
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
import de.dhbwstuttgart.parser.scope.JavaClassName;
|
||||||
@ -12,6 +13,7 @@ import de.dhbwstuttgart.typeinference.constraints.ConstraintSet;
|
|||||||
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
|
import de.dhbwstuttgart.typeinference.assumptions.TypeInferenceInformation;
|
||||||
import org.antlr.v4.runtime.Token;
|
import org.antlr.v4.runtime.Token;
|
||||||
|
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -33,6 +35,7 @@ public class ClassOrInterface extends SyntaxTreeNode implements TypeScope{
|
|||||||
public ClassOrInterface(int modifiers, JavaClassName name, List<Field> fielddecl, List<Method> methods, List<Constructor> constructors, GenericDeclarationList genericClassParameters,
|
public ClassOrInterface(int modifiers, JavaClassName name, List<Field> fielddecl, List<Method> methods, List<Constructor> constructors, GenericDeclarationList genericClassParameters,
|
||||||
RefType superClass, Boolean isInterface, List<RefType> implementedInterfaces, Token offset){
|
RefType superClass, Boolean isInterface, List<RefType> implementedInterfaces, Token offset){
|
||||||
super(offset);
|
super(offset);
|
||||||
|
if(isInterface && !Modifier.isInterface(modifiers))modifiers += Modifier.INTERFACE;
|
||||||
this.modifiers = modifiers;
|
this.modifiers = modifiers;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.fields = fielddecl;
|
this.fields = fielddecl;
|
||||||
|
Loading…
Reference in New Issue
Block a user