Exception: RBS::RecursiveTypeAliasError

Inherits:
LoadingError show all
Defined in:
lib/rbs/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alias_names:, location:) ⇒ RecursiveTypeAliasError

Returns a new instance of RecursiveTypeAliasError.



423
424
425
426
427
428
# File 'lib/rbs/errors.rb', line 423

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

  super "#{Location.to_string location}: Recursive type alias definition found for: #{name}"
end

Instance Attribute Details

#alias_namesObject (readonly)

Returns the value of attribute alias_names.



420
421
422
# File 'lib/rbs/errors.rb', line 420

def alias_names
  @alias_names
end

#locationObject (readonly)

Returns the value of attribute location.



421
422
423
# File 'lib/rbs/errors.rb', line 421

def location
  @location
end

Instance Method Details

#nameObject



430
431
432
# File 'lib/rbs/errors.rb', line 430

def name
  @alias_names.map(&:name).join(', ')
end