Method: Parser::Ruby33#_reduce_715

Defined in:
lib/parser/ruby33.rb

#_reduce_715(val, _values, result) ⇒ Object


12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
# File 'lib/parser/ruby33.rb', line 12489

def _reduce_715(val, _values, result)
                      if !@static_env.declared_anonymous_kwrestarg?
                        diagnostic :error, :no_anonymous_kwrestarg, nil, val[0]
                      end

                      if @context.in_dynamic_block? && context.in_def &&
                        @static_env.declared_anonymous_kwrestarg_in_current_scope? && @static_env.parent_has_anonymous_kwrestarg?
                        diagnostic :error, :ambiguous_anonymous_kwrestarg, nil, val[0]
                      end

                      result = @builder.forwarded_kwrestarg(val[0])

    result
end