class RBS::InheritModuleError
Attributes
Public Class Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/errors.rb, line 202 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
Source
# File bundled-src/rbs-3.10.0/lib/rbs/errors.rb, line 192 def initialize(super_decl) @super_decl = super_decl super "#{Location.to_string(super_decl.location)}: Cannot inherit a module: #{super_decl.name}" end
Calls superclass method
Exception::new
Public Instance Methods
Source
# File bundled-src/rbs-3.10.0/lib/rbs/errors.rb, line 198 def location @super_decl.location end