123456789_123456789_123456789_123456789_123456789_

Exception: RBS::InvalidOverloadMethodError

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, DefinitionError, BaseError, StandardError
Instance Chain:
self, DefinitionError, BaseError, StandardError
Inherits: RBS::DefinitionError
Defined in: lib/rbs/errors.rb

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(type_name:, method_name:, kind:, members:) ⇒ InvalidOverloadMethodError

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 310

def initialize(type_name:, method_name:, kind:, members:)
  @type_name = type_name
  @method_name = method_name
  @kind = kind
  @members = members

  delimiter = case kind
              when :instance
                "#"
              when :singleton
                "."
              end

  super "#{Location.to_string members[0].location}: Invalid method overloading: #{type_name}#{delimiter}#{method_name}"
end

Instance Attribute Details

#kind (readonly)

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 307

attr_reader :kind

#members (readonly)

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 308

attr_reader :members

#method_name (readonly)

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 306

attr_reader :method_name

#type_name (readonly)

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 305

attr_reader :type_name