File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/main/java/org/truffleruby/parser/ast Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 39
39
***** END LICENSE BLOCK *****/
40
40
package org .truffleruby .parser .ast ;
41
41
42
+ import com .oracle .truffle .api .CompilerDirectives ;
42
43
import org .truffleruby .language .SourceIndexLength ;
43
44
import org .truffleruby .parser .ast .visitor .NodeVisitor ;
44
45
@@ -58,7 +59,11 @@ public InParseNode(
58
59
super (position );
59
60
60
61
if (expressionNodes instanceof ArrayParseNode ) {
61
- expressionNodes = ((ArrayParseNode ) expressionNodes ).get (0 );
62
+ var arrayParseNode = (ArrayParseNode ) expressionNodes ;
63
+ if (arrayParseNode .size () != 1 ) {
64
+ throw CompilerDirectives .shouldNotReachHere ();
65
+ }
66
+ expressionNodes = arrayParseNode .get (0 );
62
67
}
63
68
64
69
this .expressionNodes = expressionNodes ;
You can’t perform that action at this time.
0 commit comments