In Files

  • rbs-2.1.0/lib/rbs/errors.rb

Methods

Class/Module Index [+]

Quicksearch

RBS::NoTypeFoundError

Attributes

location[R]
type_name[R]

Public Class Methods

check!(type_name, env:, location:) click to toggle source
 
               # File rbs-2.1.0/lib/rbs/errors.rb, line 119
def self.check!(type_name, env,, location))
  dic = case
        when type_name.class?
          env.class_decls
        when type_name.alias?
          env.alias_decls
        when type_name.interface?
          env.interface_decls
        else
          raise
        end

  dic.key?(type_name) or raise new(type_name: type_name, location: location)

  type_name
end
            
new(type_name:, location:) click to toggle source
 
               # File rbs-2.1.0/lib/rbs/errors.rb, line 112
def initialize(type_name,, location))
  @type_name = type_name
  @location = location

  super "#{Location.to_string location}: Could not find #{type_name}"
end