Exception: RBS::RecursiveTypeAliasError

Inherits:
BaseError
  • Object
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.



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

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.



442
443
444
# File 'lib/rbs/errors.rb', line 442

def alias_names
  @alias_names
end

#locationObject (readonly)

Returns the value of attribute location.



443
444
445
# File 'lib/rbs/errors.rb', line 443

def location
  @location
end

Instance Method Details

#nameObject



452
453
454
# File 'lib/rbs/errors.rb', line 452

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