123456789_123456789_123456789_123456789_123456789_

Exception: RBS::RecursiveAliasDefinitionError

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, DefinitionError, BaseError, StandardError
Instance Chain:
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 429

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 427

attr_reader :defs

#type (readonly)

[ GitHub ]

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

attr_reader :type

Instance Method Details

#location

[ GitHub ]

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

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