Exception: RBS::NonregularTypeAliasError

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

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.

Parameters:



551
552
553
554
555
556
# File 'lib/rbs/errors.rb', line 551

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

#diagnosticTypeAliasRegularity::Diagnostic (readonly)

Diagnostic reported from TypeAliasRegularity.



343
344
345
# File 'sig/errors.rbs', line 343

def diagnostic
  @diagnostic
end

#locationLocation[untyped, untyped]? (readonly)

Location of the definition.

Returns:



346
347
348
# File 'sig/errors.rbs', line 346

def location
  @location
end