class RBS::NoSelfTypeFoundError
Attributes
location
[R]
Location[untyped, untyped]?
Public Class Methods
(AST::Declarations::Module::Self, env: Environment) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/errors.rb, line 223 def self.check!(self_type, env:) self_name = env.normalize_type_name(self_type.name) (env.module_name?(self_name) || env.interface_name?(self_name)) or raise new(type_name: self_type.name, location: self_type.location) end
The type name in self is automatically normalized
(type_name: TypeName, location: Location[untyped, untyped]?) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/errors.rb, line 216 def initialize(type_name:, location:) @type_name = type_name @location = location super "#{Location.to_string location}: Could not find self type: #{type_name}" end
Calls superclass method
Exception::new