diff --git a/Triangle.AbstractMachine.Disassembler/build.gradle b/Triangle.AbstractMachine.Disassembler/build.gradle index 075e008..90e01e7 100644 --- a/Triangle.AbstractMachine.Disassembler/build.gradle +++ b/Triangle.AbstractMachine.Disassembler/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'java' apply plugin: 'application' -sourceCompatibility = 17 +sourceCompatibility = 11 dependencies { implementation project(':Triangle.AbstractMachine') diff --git a/Triangle.AbstractMachine.Interpreter/build.gradle b/Triangle.AbstractMachine.Interpreter/build.gradle index cf4fad0..38c7835 100644 --- a/Triangle.AbstractMachine.Interpreter/build.gradle +++ b/Triangle.AbstractMachine.Interpreter/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'java' apply plugin: 'application' -sourceCompatibility = 17 +sourceCompatibility = 11 dependencies { implementation project(':Triangle.AbstractMachine') diff --git a/Triangle.AbstractMachine/build.gradle b/Triangle.AbstractMachine/build.gradle index 4324881..80f98eb 100644 --- a/Triangle.AbstractMachine/build.gradle +++ b/Triangle.AbstractMachine/build.gradle @@ -1,4 +1,4 @@ apply plugin: 'java-library' apply plugin: 'eclipse' -sourceCompatibility = 17 \ No newline at end of file +sourceCompatibility = 11 \ No newline at end of file diff --git a/Triangle.Compiler/build.gradle b/Triangle.Compiler/build.gradle index 326eb52..a27ea3f 100644 --- a/Triangle.Compiler/build.gradle +++ b/Triangle.Compiler/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'java' apply plugin: 'application' -sourceCompatibility = 17 +sourceCompatibility = 11 dependencies { implementation project(':Triangle.AbstractMachine') diff --git a/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/ConstFormalParameter.java b/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/ConstFormalParameter.java index 9bd646c..c860a53 100644 --- a/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/ConstFormalParameter.java +++ b/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/ConstFormalParameter.java @@ -39,8 +39,8 @@ public class ConstFormalParameter extends FormalParameter implements ConstantDec @Override public boolean equals(Object fpAST) { - if (fpAST instanceof ConstFormalParameter cfpAST) { - return T.equals(cfpAST.T); + if (fpAST instanceof ConstFormalParameter) { + return T.equals(((ConstFormalParameter)fpAST).T); } else { return false; } diff --git a/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/VarFormalParameter.java b/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/VarFormalParameter.java index 57cfdbc..19efd56 100644 --- a/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/VarFormalParameter.java +++ b/Triangle.Compiler/src/main/java/triangle/abstractSyntaxTrees/formals/VarFormalParameter.java @@ -39,8 +39,8 @@ public class VarFormalParameter extends FormalParameter implements VariableDecla @Override public boolean equals(Object fpAST) { - if (fpAST instanceof VarFormalParameter vfpAST) { - return T.equals(vfpAST.T); + if (fpAST instanceof VarFormalParameter) { + return T.equals(((VarFormalParameter)fpAST).T); } else { return false; } diff --git a/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java b/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java index 9a9f5b2..56a3a2e 100644 --- a/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java +++ b/Triangle.Compiler/src/main/java/triangle/contextualAnalyzer/Checker.java @@ -132,7 +132,8 @@ public final class Checker implements ActualParameterVisitor