class RBS::InheritModuleError

Attributes

super_decl[R]

Public Class Methods

check!(super_decl, env:) click to toggle source
# File rbs-2.8.2/lib/rbs/errors.rb, line 168
def self.check!(super_decl, env:)
  return if env.class_decls[super_decl.name].is_a?(Environment::ClassEntry)

  raise new(super_decl)
end
new(super_decl) click to toggle source
Calls superclass method
# File rbs-2.8.2/lib/rbs/errors.rb, line 162
def initialize(super_decl)
  @super_decl = super_decl

  super "#{Location.to_string(super_decl.location)}: Cannot inherit a module: #{super_decl.name}"
end