class RBS::InconsistentClassModuleAliasError

属性

alias_entry[R]

公共类方法

new(entry) 点击切换源码
调用父类方法
# File rbs-3.8.0/lib/rbs/errors.rb, line 534
def initialize(entry)
  @alias_entry = entry

  expected_kind, actual_kind =
    case entry
    when Environment::ModuleAliasEntry
      ["module", "class"]
    when Environment::ClassAliasEntry
      ["class", "module"]
    end

  super "#{Location.to_string(entry.decl.location&.[](:old_name))}: A #{expected_kind} `#{entry.decl.new_name}` cannot be an alias of a #{actual_kind} `#{entry.decl.old_name}`"
end

公共实例方法

location() 点击切换源码
# File rbs-3.8.0/lib/rbs/errors.rb, line 548
def location
  @alias_entry.decl.location
end