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.



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

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.



391
392
393
# File 'lib/rbs/errors.rb', line 391

def alias_names
  @alias_names
end

#locationObject (readonly)

Returns the value of attribute location.



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

def location
  @location
end

Instance Method Details

#nameObject



401
402
403
# File 'lib/rbs/errors.rb', line 401

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