123456789_123456789_123456789_123456789_123456789_

Exception: RBS::RecursiveAliasDefinitionError

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, DefinitionError, ErrorBase, StandardError
Instance Chain:
self, DefinitionError, ErrorBase, StandardError
Inherits: RBS::DefinitionError
Defined in: lib/rbs/errors.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(type:, defs:) ⇒ RecursiveAliasDefinitionError

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 340

def initialize(type:, defs:)
  @type = type
  @defs = defs

  super "#{Location.to_string location}: Recursive aliases in #{type}: #{defs.map(&:name).join(", ")}"
end

Instance Attribute Details

#defs (readonly)

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 338

attr_reader :defs

#type (readonly)

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 337

attr_reader :type

Instance Method Details

#location

[ GitHub ]

  
# File 'lib/rbs/errors.rb', line 347

def location
  first_def = defs.first or raise
  original = first_def.original or raise
  original.location
end