@@ -544,7 +544,6 @@ public RubyNode visitBlockArgumentNode(Nodes.BlockArgumentNode node) {
544
544
if (node .expression == null ) {
545
545
// def foo(&) a(&) end
546
546
valueNode = environment .findLocalVarNode (FORWARDED_BLOCK_NAME , null );
547
- assert valueNode != null : "block forwarding local variable should be declared" ;
548
547
} else {
549
548
// a(&:b)
550
549
valueNode = node .expression .accept (this );
@@ -1888,7 +1887,6 @@ public RubyNode visitHashNode(Nodes.HashNode node) {
1888
1887
// bar(**)
1889
1888
// end
1890
1889
valueNode = environment .findLocalVarNode (DEFAULT_KEYWORD_REST_NAME , null );
1891
- assert valueNode != null : "keyrest forwarding local variable should be declared" ;
1892
1890
}
1893
1891
1894
1892
hashConcats .add (HashCastNodeGen .HashCastASTNodeGen .create (valueNode ));
@@ -2435,7 +2433,6 @@ public RubyNode visitLocalVariableReadNode(Nodes.LocalVariableReadNode node) {
2435
2433
final String name = node .name ;
2436
2434
2437
2435
final RubyNode rubyNode = environment .findLocalVarNode (name , null );
2438
- assert rubyNode != null : name ;
2439
2436
2440
2437
return assignPositionAndFlags (node , rubyNode );
2441
2438
}
@@ -2492,9 +2489,6 @@ public RubyNode visitLocalVariableOrWriteNode(Nodes.LocalVariableOrWriteNode nod
2492
2489
public WriteLocalNode visitLocalVariableWriteNode (Nodes .LocalVariableWriteNode node ) {
2493
2490
final String name = node .name ;
2494
2491
final ReadLocalNode lhs = environment .findLocalVarNode (name , null );
2495
-
2496
- assert lhs != null ;
2497
-
2498
2492
final RubyNode rhs = node .value .accept (this );
2499
2493
final WriteLocalNode rubyNode = lhs .makeWriteNode (rhs );
2500
2494
@@ -2506,9 +2500,6 @@ public WriteLocalNode visitLocalVariableWriteNode(Nodes.LocalVariableWriteNode n
2506
2500
public WriteLocalNode visitLocalVariableTargetNode (Nodes .LocalVariableTargetNode node ) {
2507
2501
final String name = node .name ;
2508
2502
final ReadLocalNode lhs = environment .findLocalVarNode (name , null );
2509
-
2510
- assert lhs != null ;
2511
-
2512
2503
final RubyNode rhs = new DeadNode ("YARPTranslator#visitLocalVariableTargetNode" );
2513
2504
final WriteLocalNode rubyNode = lhs .makeWriteNode (rhs );
2514
2505
@@ -3066,7 +3057,6 @@ public RubyNode visitSplatNode(Nodes.SplatNode node) {
3066
3057
3067
3058
// no need for SplatCastNodeGen for * because it's always an Array and cannot be reassigned
3068
3059
rubyNode = environment .findLocalVarNode (DEFAULT_REST_NAME , null );
3069
- assert rubyNode != null : "rest forwarding local variable should be declared" ;
3070
3060
}
3071
3061
3072
3062
return assignPositionAndFlags (node , rubyNode );
0 commit comments