class RBS::InheritModuleError

Attributes

super_decl[R]

Public Class Methods

check!(super_decl, env:) click to toggle source
# File rbs-3.1.0/lib/rbs/errors.rb, line 187
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
new(super_decl) click to toggle source
Calls superclass method
# File rbs-3.1.0/lib/rbs/errors.rb, line 177
def initialize(super_decl)
  @super_decl = super_decl

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

Public Instance Methods

location() click to toggle source
# File rbs-3.1.0/lib/rbs/errors.rb, line 183
def location
  @super_decl.location
end