class RBS::InheritModuleError

Attributes

super_decl[R]

Public Class Methods

check!(super_decl, env:) click to toggle source
# File rbs-3.2.1/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
new(super_decl) click to toggle source
Calls superclass method
# File rbs-3.2.1/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

Public Instance Methods

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