Exception: RBS::InheritModuleError
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
- #super_decl readonly
Instance Method Summary
Constructor Details
.new(super_decl) ⇒ InheritModuleError
# File 'lib/rbs/errors.rb', line 184
def initialize(super_decl) @super_decl = super_decl super "#{Location.to_string(super_decl.location)}: Cannot inherit a module: #{super_decl.name}" end
Class Method Details
.check!(super_decl, env:)
[ GitHub ]# File 'lib/rbs/errors.rb', line 194
def self.check!(super_decl, env:) super_name = env.normalize_type_name(super_decl.name) return if env.class_decl?(super_name) || env.class_alias?(super_name) raise new(super_decl) end
Instance Attribute Details
#super_decl (readonly)
[ GitHub ]# File 'lib/rbs/errors.rb', line 182
attr_reader :super_decl
Instance Method Details
#location
[ GitHub ]# File 'lib/rbs/errors.rb', line 190
def location @super_decl.location end