class RBS::InheritModuleError
def self.check!(super_decl, env:)
def self.check!(super_decl, env:) return if env.class_decl?(super_decl.name) || env.class_alias?(super_decl.name) raise new(super_decl) end
def initialize(super_decl)
def initialize(super_decl) @super_decl = super_decl super "#{Location.to_string(super_decl.location)}: Cannot inherit a module: #{super_decl.name}" end