Skip to content

Commit 0fa2edc

Browse files
committed
[GR-17457] Use Java instanceof pattern matching in InParseNode
PullRequest: truffleruby/3797
2 parents c759ede + f61e8b5 commit 0fa2edc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/truffleruby/parser/ast/InParseNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ public InParseNode(
5858
ParseNode nextCase) {
5959
super(position);
6060

61-
if (expressionNodes instanceof ArrayParseNode) {
62-
var arrayParseNode = (ArrayParseNode) expressionNodes;
61+
if (expressionNodes instanceof ArrayParseNode arrayParseNode) {
6362
if (arrayParseNode.size() != 1) {
6463
throw CompilerDirectives.shouldNotReachHere();
6564
}

0 commit comments

Comments
 (0)