123456789_123456789_123456789_123456789_123456789_

Exception: RBS::InvalidVarianceAnnotationError

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

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(type_name:, param:, location:) ⇒ InvalidVarianceAnnotationError

[ GitHub ]

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

def initialize(type_name:, param:, location:)
  @type_name = type_name
  @param = param
  @location = location

  super "#{Location.to_string location}: Type parameter variance error: #{param.name} is #{param.variance} but used as incompatible variance"
end

Instance Attribute Details

#location (readonly)

[ GitHub ]

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

attr_reader :location

#param (readonly)

[ GitHub ]

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

attr_reader :param

#type_name (readonly)

[ GitHub ]

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

attr_reader :type_name