Exception: RBS::DuplicatedDeclarationError
- Inherits:
-
LoadingError
- Object
- StandardError
- BaseError
- LoadingError
- RBS::DuplicatedDeclarationError
- Defined in:
- lib/rbs/errors.rb,
sig/errors.rbs
Instance Attribute Summary collapse
-
#decls ⇒ Array[declaration]
readonly
Returns the value of attribute decls.
-
#name ⇒ TypeName, Symbol
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, *decls) ⇒ DuplicatedDeclarationError
constructor
A new instance of DuplicatedDeclarationError.
Constructor Details
#initialize(name, *decls) ⇒ DuplicatedDeclarationError
Returns a new instance of DuplicatedDeclarationError.
423 424 425 426 427 428 429 |
# File 'lib/rbs/errors.rb', line 423 def initialize(name, *decls) @name = name @decls = decls last_decl = decls.last or raise super "#{Location.to_string last_decl.location}: Duplicated declaration: #{name}" end |
Instance Attribute Details
#decls ⇒ Array[declaration] (readonly)
Returns the value of attribute decls.
421 422 423 |
# File 'lib/rbs/errors.rb', line 421 def decls @decls end |
#name ⇒ TypeName, Symbol (readonly)
Returns the value of attribute name.
420 421 422 |
# File 'lib/rbs/errors.rb', line 420 def name @name end |