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:
self, DefinitionError, BaseError, StandardError
Inherits: RBS::DefinitionError
Defined in: lib/rbs/errors.rb

Class Method Summary

Instance Attribute Summary

Constructor Details

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

[ GitHub ]

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

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 354

attr_reader :location

#param (readonly)

[ GitHub ]

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

attr_reader :param

#type_name (readonly)

[ GitHub ]

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

attr_reader :type_name