diff --git a/src/main/java/org/truffleruby/parser/BodyTranslator.java b/src/main/java/org/truffleruby/parser/BodyTranslator.java index 129283b645c0..15884a881ea5 100644 --- a/src/main/java/org/truffleruby/parser/BodyTranslator.java +++ b/src/main/java/org/truffleruby/parser/BodyTranslator.java @@ -828,7 +828,7 @@ public RubyNode visitCaseInNode(CaseInParseNode node) { } PatternMatchingTranslator translator = new PatternMatchingTranslator(language, source, parserContext, - currentNode, node.getCases(), environment, this); + currentNode, environment, this); // Evaluate the case expression and store it in a local final int tempSlot = environment.declareLocalTemp("case in value"); diff --git a/src/main/java/org/truffleruby/parser/PatternMatchingTranslator.java b/src/main/java/org/truffleruby/parser/PatternMatchingTranslator.java index f4fbf3ae2d73..53de80c8ba8a 100644 --- a/src/main/java/org/truffleruby/parser/PatternMatchingTranslator.java +++ b/src/main/java/org/truffleruby/parser/PatternMatchingTranslator.java @@ -38,7 +38,6 @@ import org.truffleruby.parser.ast.HashPatternParseNode; import org.truffleruby.parser.ast.IfParseNode; import org.truffleruby.parser.ast.LambdaParseNode; -import org.truffleruby.parser.ast.ListParseNode; import org.truffleruby.parser.ast.LocalAsgnParseNode; import org.truffleruby.parser.ast.NilParseNode; import org.truffleruby.parser.ast.ParseNode; @@ -55,7 +54,6 @@ public class PatternMatchingTranslator extends BaseTranslator { - final ListParseNode cases; final TranslatorEnvironment environment; final BodyTranslator bodyTranslator; @@ -66,11 +64,9 @@ public PatternMatchingTranslator( Source source, ParserContext parserContext, Node currentNode, - ListParseNode cases, // cases to check TranslatorEnvironment environment, BodyTranslator bodyTranslator) { super(language, source, parserContext, currentNode, environment); - this.cases = cases; this.environment = environment; this.bodyTranslator = bodyTranslator; } @@ -267,7 +263,6 @@ public RubyNode visitFixnumNode(FixnumParseNode node) { return bodyTranslator.visitFixnumNode(node); } - // Possible value patterns delegated to BodyTranslator explicitly to prevent errors. @Override public RubyNode visitTrueNode(TrueParseNode node) { return bodyTranslator.visitTrueNode(node);