Exception: RBS::NonregularTypeAliasError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(diagnostic:, location:) ⇒ NonregularTypeAliasError

Returns a new instance of NonregularTypeAliasError.



448
449
450
451
452
453
# File 'lib/rbs/errors.rb', line 448

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.



445
446
447
# File 'lib/rbs/errors.rb', line 445

def diagnostic
  @diagnostic
end

#locationObject (readonly)

Returns the value of attribute location.



446
447
448
# File 'lib/rbs/errors.rb', line 446

def location
  @location
end