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.



396
397
398
399
400
401
# File 'lib/rbs/errors.rb', line 396

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.



393
394
395
# File 'lib/rbs/errors.rb', line 393

def alias_names
  @alias_names
end

#locationObject (readonly)

Returns the value of attribute location.



394
395
396
# File 'lib/rbs/errors.rb', line 394

def location
  @location
end

Instance Method Details

#nameObject



403
404
405
# File 'lib/rbs/errors.rb', line 403

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