Exception: RBS::InvalidVarianceAnnotationError
- Inherits:
-
DefinitionError
- Object
- StandardError
- BaseError
- DefinitionError
- RBS::InvalidVarianceAnnotationError
- Includes:
- DetailedMessageable
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Instance Method Summary collapse
-
#initialize(type_name:, param:, location:) ⇒ InvalidVarianceAnnotationError
constructor
A new instance of InvalidVarianceAnnotationError.
Methods included from DetailedMessageable
Constructor Details
#initialize(type_name:, param:, location:) ⇒ InvalidVarianceAnnotationError
Returns a new instance of InvalidVarianceAnnotationError.
399 400 401 402 403 404 405 |
# File 'lib/rbs/errors.rb', line 399 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 ⇒ Object (readonly)
Returns the value of attribute location.
397 398 399 |
# File 'lib/rbs/errors.rb', line 397 def location @location end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
396 397 398 |
# File 'lib/rbs/errors.rb', line 396 def param @param end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
395 396 397 |
# File 'lib/rbs/errors.rb', line 395 def type_name @type_name end |