In Files

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

Class/Module Index [+]

Quicksearch

RBS::MixinClassError

Attributes

member[R]
type_name[R]

Public Class Methods

check!(type_name:, env:, member:) click to toggle source
 
               # File rbs-2.1.0/lib/rbs/errors.rb, line 396
def self.check!(type_name,, env,, member))
  case env.class_decls[member.name]
  when Environment::ClassEntry
    raise new(type_name: type_name, member: member)
  end
end
            
new(type_name:, member:) click to toggle source
 
               # File rbs-2.1.0/lib/rbs/errors.rb, line 385
def initialize(type_name,, member))
  @type_name = type_name
  @member = member

  super "#{Location.to_string member.location}: Cannot #{mixin_name} a class `#{member.name}` in the definition of `#{type_name}`"
end
            

Public Instance Methods

location() click to toggle source
 
               # File rbs-2.1.0/lib/rbs/errors.rb, line 392
def location
  member.location
end