Exception: RBS::NonregularTypeAliasError

Inherits:
BaseError
  • Object
show all
Includes:
DetailedMessageable
Defined in:
lib/rbs/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DetailedMessageable

#detailed_message

Constructor Details

#initialize(diagnostic:, location:) ⇒ NonregularTypeAliasError

Returns a new instance of NonregularTypeAliasError.



484
485
486
487
488
489
# File 'lib/rbs/errors.rb', line 484

def initialize(diagnostic:, location:)
  @diagnostic = diagnostic
  @location = location

  super "#{Location.to_string location}: Nonregular generic type alias is prohibited: #{diagnostic.type_name}, #{diagnostic.nonregular_type}"
end

Instance Attribute Details

#diagnosticObject (readonly)

Returns the value of attribute diagnostic.



481
482
483
# File 'lib/rbs/errors.rb', line 481

def diagnostic
  @diagnostic
end

#locationObject (readonly)

Returns the value of attribute location.



482
483
484
# File 'lib/rbs/errors.rb', line 482

def location
  @location
end