Exception: RBS::RecursiveAliasDefinitionError
- Inherits:
-
DefinitionError
- Object
- StandardError
- BaseError
- DefinitionError
- RBS::RecursiveAliasDefinitionError
- Includes:
- DetailedMessageable
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#defs ⇒ Object
readonly
Returns the value of attribute defs.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type:, defs:) ⇒ RecursiveAliasDefinitionError
constructor
A new instance of RecursiveAliasDefinitionError.
- #location ⇒ Object
Methods included from DetailedMessageable
Constructor Details
#initialize(type:, defs:) ⇒ RecursiveAliasDefinitionError
Returns a new instance of RecursiveAliasDefinitionError.
407 408 409 410 411 412 |
# File 'lib/rbs/errors.rb', line 407 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 ⇒ Object (readonly)
Returns the value of attribute defs.
405 406 407 |
# File 'lib/rbs/errors.rb', line 405 def defs @defs end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
404 405 406 |
# File 'lib/rbs/errors.rb', line 404 def type @type end |
Instance Method Details
#location ⇒ Object
414 415 416 417 418 |
# File 'lib/rbs/errors.rb', line 414 def location first_def = defs.first or raise original = first_def.original or raise original.location end |