In Files

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

Parent

Methods

Class/Module Index [+]

Quicksearch

RBS::NoSelfTypeFoundError

Attributes

location[R]
type_name[R]

Public Class Methods

check!(self_type, env:) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/errors.rb, line 132
def self.check!(self_type, env))
  type_name = self_type.name

  dic = case
        when type_name.class?
          env.class_decls
        when type_name.interface?
          env.interface_decls
        else
          raise
        end

  dic.key?(type_name) or raise new(type_name: type_name, location: self_type.location)
end
            
new(type_name:, location:) click to toggle source
 
               # File rbs-1.0.4/lib/rbs/errors.rb, line 125
def initialize(type_name,, location))
  @type_name = type_name
  @location = location

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