diff --git a/Gemfile.lock b/Gemfile.lock index 8186d37a..2a691830 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ PATH specs: rbi (0.3.9) prism (~> 1.0) - rbs (>= 3.4.4) + rbs (>= 4.0.1) GEM remote: https://rubygems.org/ @@ -29,13 +29,14 @@ GEM parser (3.3.10.0) ast (~> 2.4.1) racc - prism (1.6.0) + prism (1.9.0) racc (1.8.1) rainbow (3.1.1) rake (13.3.1) - rbs (4.0.0.dev.4) + rbs (4.0.1) logger - prism (>= 1.3.0) + prism (>= 1.6.0) + tsort regexp_parser (2.11.3) require-hooks (0.2.2) rexml (3.4.4) @@ -87,6 +88,7 @@ GEM thor (>= 1.2.0) yard-sorbet thor (1.4.0) + tsort (0.2.0) unicode-display_width (3.2.0) unicode-emoji (~> 4.1) unicode-emoji (4.1.0) diff --git a/lib/rbi/rbs/type_translator.rb b/lib/rbi/rbs/type_translator.rb index 1f3e82ae..a54df111 100644 --- a/lib/rbi/rbs/type_translator.rb +++ b/lib/rbi/rbs/type_translator.rb @@ -54,7 +54,8 @@ def translate(type) when ::RBS::Types::Bases::Void Type.void when ::RBS::Types::ClassSingleton - Type.class_of(Type.simple(type.name.to_s)) + type_parameter = type.args.first ? translate(type.args.first) : nil + Type.class_of(Type.simple(type.name.to_s), type_parameter) when ::RBS::Types::ClassInstance translate_class_instance(type) when ::RBS::Types::Function diff --git a/lib/rbi/rbs_printer.rb b/lib/rbi/rbs_printer.rb index b324b509..297d56a5 100644 --- a/lib/rbi/rbs_printer.rb +++ b/lib/rbi/rbs_printer.rb @@ -1106,6 +1106,11 @@ def visit_class_of(type) @string << "singleton(" visit(type.type) @string << ")" + if (type_parameter = type.type_parameter) + @string << "[" + visit(type_parameter) + @string << "]" + end end #: (Type::All type) -> void diff --git a/rbi.gemspec b/rbi.gemspec index 276cf177..25f915fe 100644 --- a/rbi.gemspec +++ b/rbi.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |spec| ] spec.add_dependency("prism", "~> 1.0") - spec.add_dependency("rbs", ">= 3.4.4") + spec.add_dependency("rbs", ">= 4.0.1") spec.required_ruby_version = ">= 3.1" end diff --git a/sorbet/rbi/gems/rbs@3.8.1.rbi b/sorbet/rbi/gems/rbs@4.0.1.rbi similarity index 62% rename from sorbet/rbi/gems/rbs@3.8.1.rbi rename to sorbet/rbi/gems/rbs@4.0.1.rbi index 1930d2d5..d27a085b 100644 --- a/sorbet/rbi/gems/rbs@3.8.1.rbi +++ b/sorbet/rbi/gems/rbs@4.0.1.rbi @@ -5,38 +5,29 @@ # Please instead update this file by running `bin/tapioca gem rbs`. -# source://rbs//lib/rbs/namespace.rb#120 -module Kernel - # source://rbs//lib/rbs/namespace.rb#121 - def Namespace(name); end - - # source://rbs//lib/rbs/type_name.rb#105 - def TypeName(string); end -end - # source://rbs//lib/rbs/version.rb#3 module RBS class << self - # source://rbs//lib/rbs.rb#68 + # source://rbs//lib/rbs.rb#80 def logger; end # Returns the value of attribute logger_level. # - # source://rbs//lib/rbs.rb#65 + # source://rbs//lib/rbs.rb#77 def logger_level; end - # source://rbs//lib/rbs.rb#77 + # source://rbs//lib/rbs.rb#89 def logger_level=(level); end # Returns the value of attribute logger_output. # - # source://rbs//lib/rbs.rb#66 + # source://rbs//lib/rbs.rb#78 def logger_output; end - # source://rbs//lib/rbs.rb#72 + # source://rbs//lib/rbs.rb#84 def logger_output=(val); end - # source://rbs//lib/rbs.rb#82 + # source://rbs//lib/rbs.rb#94 def print_warning; end end end @@ -54,7 +45,7 @@ class RBS::AST::Annotation # source://rbs//lib/rbs/ast/annotation.rb#14 def ==(other); end - # source://rbs//lib/rbs/ast/annotation.rb#14 + # source://rbs//lib/rbs/ast/annotation.rb#18 def eql?(other); end # source://rbs//lib/rbs/ast/annotation.rb#20 @@ -84,7 +75,7 @@ class RBS::AST::Comment # source://rbs//lib/rbs/ast/comment.rb#14 def ==(other); end - # source://rbs//lib/rbs/ast/comment.rb#14 + # source://rbs//lib/rbs/ast/comment.rb#18 def eql?(other); end # source://rbs//lib/rbs/ast/comment.rb#20 @@ -107,40 +98,45 @@ end # source://rbs//lib/rbs/ast/declarations.rb#5 module RBS::AST::Declarations; end -# source://rbs//lib/rbs/ast/declarations.rb#419 +# source://rbs//lib/rbs/ast/declarations.rb#423 class RBS::AST::Declarations::AliasDecl < ::RBS::AST::Declarations::Base # @return [AliasDecl] a new instance of AliasDecl # - # source://rbs//lib/rbs/ast/declarations.rb#422 - def initialize(new_name:, old_name:, location:, comment:); end + # source://rbs//lib/rbs/ast/declarations.rb#426 + def initialize(new_name:, old_name:, location:, comment:, annotations: T.unsafe(nil)); end - # source://rbs//lib/rbs/ast/declarations.rb#429 + # source://rbs//lib/rbs/ast/declarations.rb#434 def ==(other); end + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#424 + def annotations; end + # Returns the value of attribute comment. # - # source://rbs//lib/rbs/ast/declarations.rb#420 + # source://rbs//lib/rbs/ast/declarations.rb#424 def comment; end - # source://rbs//lib/rbs/ast/declarations.rb#429 + # source://rbs//lib/rbs/ast/declarations.rb#440 def eql?(other); end - # source://rbs//lib/rbs/ast/declarations.rb#437 + # source://rbs//lib/rbs/ast/declarations.rb#442 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/declarations.rb#420 + # source://rbs//lib/rbs/ast/declarations.rb#424 def location; end # Returns the value of attribute new_name. # - # source://rbs//lib/rbs/ast/declarations.rb#420 + # source://rbs//lib/rbs/ast/declarations.rb#424 def new_name; end # Returns the value of attribute old_name. # - # source://rbs//lib/rbs/ast/declarations.rb#420 + # source://rbs//lib/rbs/ast/declarations.rb#424 def old_name; end end @@ -170,7 +166,7 @@ class RBS::AST::Declarations::Class < ::RBS::AST::Declarations::Base # source://rbs//lib/rbs/ast/declarations.rb#95 def comment; end - # source://rbs//lib/rbs/ast/declarations.rb#119 + # source://rbs//lib/rbs/ast/declarations.rb#127 def eql?(other); end # source://rbs//lib/rbs/ast/declarations.rb#129 @@ -223,7 +219,7 @@ class RBS::AST::Declarations::Class::Super # source://rbs//lib/rbs/ast/declarations.rb#58 def args; end - # source://rbs//lib/rbs/ast/declarations.rb#67 + # source://rbs//lib/rbs/ast/declarations.rb#71 def eql?(other); end # source://rbs//lib/rbs/ast/declarations.rb#73 @@ -243,9 +239,9 @@ class RBS::AST::Declarations::Class::Super def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/declarations.rb#442 +# source://rbs//lib/rbs/ast/declarations.rb#447 class RBS::AST::Declarations::ClassAlias < ::RBS::AST::Declarations::AliasDecl - # source://rbs//lib/rbs/ast/declarations.rb#443 + # source://rbs//lib/rbs/ast/declarations.rb#448 def to_json(state = T.unsafe(nil)); end end @@ -253,21 +249,26 @@ end class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base # @return [Constant] a new instance of Constant # - # source://rbs//lib/rbs/ast/declarations.rb#353 - def initialize(name:, type:, location:, comment:); end + # source://rbs//lib/rbs/ast/declarations.rb#354 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end - # source://rbs//lib/rbs/ast/declarations.rb#360 + # source://rbs//lib/rbs/ast/declarations.rb#362 def ==(other); end + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#352 + def annotations; end + # Returns the value of attribute comment. # # source://rbs//lib/rbs/ast/declarations.rb#351 def comment; end - # source://rbs//lib/rbs/ast/declarations.rb#360 + # source://rbs//lib/rbs/ast/declarations.rb#368 def eql?(other); end - # source://rbs//lib/rbs/ast/declarations.rb#368 + # source://rbs//lib/rbs/ast/declarations.rb#370 def hash; end # Returns the value of attribute location. @@ -280,7 +281,7 @@ class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base # source://rbs//lib/rbs/ast/declarations.rb#348 def name; end - # source://rbs//lib/rbs/ast/declarations.rb#372 + # source://rbs//lib/rbs/ast/declarations.rb#374 def to_json(state = T.unsafe(nil)); end # Returns the value of attribute type. @@ -289,43 +290,48 @@ class RBS::AST::Declarations::Constant < ::RBS::AST::Declarations::Base def type; end end -# source://rbs//lib/rbs/ast/declarations.rb#383 +# source://rbs//lib/rbs/ast/declarations.rb#385 class RBS::AST::Declarations::Global < ::RBS::AST::Declarations::Base # @return [Global] a new instance of Global # - # source://rbs//lib/rbs/ast/declarations.rb#389 - def initialize(name:, type:, location:, comment:); end + # source://rbs//lib/rbs/ast/declarations.rb#392 + def initialize(name:, type:, location:, comment:, annotations: T.unsafe(nil)); end - # source://rbs//lib/rbs/ast/declarations.rb#396 + # source://rbs//lib/rbs/ast/declarations.rb#400 def ==(other); end + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/declarations.rb#390 + def annotations; end + # Returns the value of attribute comment. # - # source://rbs//lib/rbs/ast/declarations.rb#387 + # source://rbs//lib/rbs/ast/declarations.rb#389 def comment; end - # source://rbs//lib/rbs/ast/declarations.rb#396 + # source://rbs//lib/rbs/ast/declarations.rb#406 def eql?(other); end - # source://rbs//lib/rbs/ast/declarations.rb#404 + # source://rbs//lib/rbs/ast/declarations.rb#408 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/declarations.rb#386 + # source://rbs//lib/rbs/ast/declarations.rb#388 def location; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/ast/declarations.rb#384 + # source://rbs//lib/rbs/ast/declarations.rb#386 def name; end - # source://rbs//lib/rbs/ast/declarations.rb#408 + # source://rbs//lib/rbs/ast/declarations.rb#412 def to_json(state = T.unsafe(nil)); end # Returns the value of attribute type. # - # source://rbs//lib/rbs/ast/declarations.rb#385 + # source://rbs//lib/rbs/ast/declarations.rb#387 def type; end end @@ -351,7 +357,7 @@ class RBS::AST::Declarations::Interface < ::RBS::AST::Declarations::Base # source://rbs//lib/rbs/ast/declarations.rb#254 def comment; end - # source://rbs//lib/rbs/ast/declarations.rb#278 + # source://rbs//lib/rbs/ast/declarations.rb#285 def eql?(other); end # source://rbs//lib/rbs/ast/declarations.rb#287 @@ -413,7 +419,7 @@ class RBS::AST::Declarations::Module < ::RBS::AST::Declarations::Base # source://rbs//lib/rbs/ast/declarations.rb#195 def comment; end - # source://rbs//lib/rbs/ast/declarations.rb#220 + # source://rbs//lib/rbs/ast/declarations.rb#228 def eql?(other); end # source://rbs//lib/rbs/ast/declarations.rb#230 @@ -466,7 +472,7 @@ class RBS::AST::Declarations::Module::Self # source://rbs//lib/rbs/ast/declarations.rb#150 def args; end - # source://rbs//lib/rbs/ast/declarations.rb#159 + # source://rbs//lib/rbs/ast/declarations.rb#163 def eql?(other); end # source://rbs//lib/rbs/ast/declarations.rb#165 @@ -489,9 +495,9 @@ class RBS::AST::Declarations::Module::Self def to_s; end end -# source://rbs//lib/rbs/ast/declarations.rb#454 +# source://rbs//lib/rbs/ast/declarations.rb#459 class RBS::AST::Declarations::ModuleAlias < ::RBS::AST::Declarations::AliasDecl - # source://rbs//lib/rbs/ast/declarations.rb#455 + # source://rbs//lib/rbs/ast/declarations.rb#460 def to_json(state = T.unsafe(nil)); end end @@ -524,7 +530,7 @@ class RBS::AST::Declarations::TypeAlias < ::RBS::AST::Declarations::Base # source://rbs//lib/rbs/ast/declarations.rb#310 def comment; end - # source://rbs//lib/rbs/ast/declarations.rb#321 + # source://rbs//lib/rbs/ast/declarations.rb#328 def eql?(other); end # source://rbs//lib/rbs/ast/declarations.rb#330 @@ -560,6 +566,24 @@ module RBS::AST::Directives; end # source://rbs//lib/rbs/ast/directives.rb#6 class RBS::AST::Directives::Base; end +# source://rbs//lib/rbs/ast/directives.rb#37 +class RBS::AST::Directives::ResolveTypeNames < ::RBS::AST::Directives::Base + # @return [ResolveTypeNames] a new instance of ResolveTypeNames + # + # source://rbs//lib/rbs/ast/directives.rb#42 + def initialize(value:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/directives.rb#38 + def location; end + + # Returns the value of attribute value. + # + # source://rbs//lib/rbs/ast/directives.rb#40 + def value; end +end + # source://rbs//lib/rbs/ast/directives.rb#9 class RBS::AST::Directives::Use < ::RBS::AST::Directives::Base # @return [Use] a new instance of Use @@ -622,208 +646,208 @@ end # source://rbs//lib/rbs/ast/members.rb#5 module RBS::AST::Members; end -# source://rbs//lib/rbs/ast/members.rb#397 +# source://rbs//lib/rbs/ast/members.rb#399 class RBS::AST::Members::Alias < ::RBS::AST::Members::Base # @return [Alias] a new instance of Alias # - # source://rbs//lib/rbs/ast/members.rb#405 + # source://rbs//lib/rbs/ast/members.rb#407 def initialize(new_name:, old_name:, kind:, annotations:, location:, comment:); end - # source://rbs//lib/rbs/ast/members.rb#414 + # source://rbs//lib/rbs/ast/members.rb#416 def ==(other); end # Returns the value of attribute annotations. # - # source://rbs//lib/rbs/ast/members.rb#401 + # source://rbs//lib/rbs/ast/members.rb#403 def annotations; end # Returns the value of attribute comment. # - # source://rbs//lib/rbs/ast/members.rb#403 + # source://rbs//lib/rbs/ast/members.rb#405 def comment; end - # source://rbs//lib/rbs/ast/members.rb#414 + # source://rbs//lib/rbs/ast/members.rb#423 def eql?(other); end - # source://rbs//lib/rbs/ast/members.rb#423 + # source://rbs//lib/rbs/ast/members.rb#425 def hash; end # @return [Boolean] # - # source://rbs//lib/rbs/ast/members.rb#439 + # source://rbs//lib/rbs/ast/members.rb#441 def instance?; end # Returns the value of attribute kind. # - # source://rbs//lib/rbs/ast/members.rb#400 + # source://rbs//lib/rbs/ast/members.rb#402 def kind; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/members.rb#402 + # source://rbs//lib/rbs/ast/members.rb#404 def location; end # Returns the value of attribute new_name. # - # source://rbs//lib/rbs/ast/members.rb#398 + # source://rbs//lib/rbs/ast/members.rb#400 def new_name; end # Returns the value of attribute old_name. # - # source://rbs//lib/rbs/ast/members.rb#399 + # source://rbs//lib/rbs/ast/members.rb#401 def old_name; end # @return [Boolean] # - # source://rbs//lib/rbs/ast/members.rb#443 + # source://rbs//lib/rbs/ast/members.rb#445 def singleton?; end - # source://rbs//lib/rbs/ast/members.rb#427 + # source://rbs//lib/rbs/ast/members.rb#429 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#327 +# source://rbs//lib/rbs/ast/members.rb#329 class RBS::AST::Members::AttrAccessor < ::RBS::AST::Members::Base include ::RBS::AST::Members::Attribute - # source://rbs//lib/rbs/ast/members.rb#330 + # source://rbs//lib/rbs/ast/members.rb#332 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#309 +# source://rbs//lib/rbs/ast/members.rb#311 class RBS::AST::Members::AttrReader < ::RBS::AST::Members::Base include ::RBS::AST::Members::Attribute - # source://rbs//lib/rbs/ast/members.rb#312 + # source://rbs//lib/rbs/ast/members.rb#314 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#345 +# source://rbs//lib/rbs/ast/members.rb#347 class RBS::AST::Members::AttrWriter < ::RBS::AST::Members::Base include ::RBS::AST::Members::Attribute - # source://rbs//lib/rbs/ast/members.rb#348 + # source://rbs//lib/rbs/ast/members.rb#350 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#258 +# source://rbs//lib/rbs/ast/members.rb#260 module RBS::AST::Members::Attribute - # source://rbs//lib/rbs/ast/members.rb#268 + # source://rbs//lib/rbs/ast/members.rb#270 def initialize(name:, type:, ivar_name:, kind:, annotations:, location:, comment:, visibility: T.unsafe(nil)); end - # source://rbs//lib/rbs/ast/members.rb#279 + # source://rbs//lib/rbs/ast/members.rb#281 def ==(other); end # Returns the value of attribute annotations. # - # source://rbs//lib/rbs/ast/members.rb#263 + # source://rbs//lib/rbs/ast/members.rb#265 def annotations; end # Returns the value of attribute comment. # - # source://rbs//lib/rbs/ast/members.rb#265 + # source://rbs//lib/rbs/ast/members.rb#267 def comment; end - # source://rbs//lib/rbs/ast/members.rb#279 + # source://rbs//lib/rbs/ast/members.rb#290 def eql?(other); end - # source://rbs//lib/rbs/ast/members.rb#290 + # source://rbs//lib/rbs/ast/members.rb#292 def hash; end # Returns the value of attribute ivar_name. # - # source://rbs//lib/rbs/ast/members.rb#262 + # source://rbs//lib/rbs/ast/members.rb#264 def ivar_name; end # Returns the value of attribute kind. # - # source://rbs//lib/rbs/ast/members.rb#261 + # source://rbs//lib/rbs/ast/members.rb#263 def kind; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/members.rb#264 + # source://rbs//lib/rbs/ast/members.rb#266 def location; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/ast/members.rb#259 + # source://rbs//lib/rbs/ast/members.rb#261 def name; end # Returns the value of attribute type. # - # source://rbs//lib/rbs/ast/members.rb#260 + # source://rbs//lib/rbs/ast/members.rb#262 def type; end - # source://rbs//lib/rbs/ast/members.rb#294 + # source://rbs//lib/rbs/ast/members.rb#296 def update(name: T.unsafe(nil), type: T.unsafe(nil), ivar_name: T.unsafe(nil), kind: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), visibility: T.unsafe(nil)); end # Returns the value of attribute visibility. # - # source://rbs//lib/rbs/ast/members.rb#266 + # source://rbs//lib/rbs/ast/members.rb#268 def visibility; end end # source://rbs//lib/rbs/ast/members.rb#6 class RBS::AST::Members::Base; end -# source://rbs//lib/rbs/ast/members.rb#157 +# source://rbs//lib/rbs/ast/members.rb#159 class RBS::AST::Members::ClassInstanceVariable < ::RBS::AST::Members::Base include ::RBS::AST::Members::Var - # source://rbs//lib/rbs/ast/members.rb#160 + # source://rbs//lib/rbs/ast/members.rb#162 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#171 +# source://rbs//lib/rbs/ast/members.rb#173 class RBS::AST::Members::ClassVariable < ::RBS::AST::Members::Base include ::RBS::AST::Members::Var - # source://rbs//lib/rbs/ast/members.rb#174 + # source://rbs//lib/rbs/ast/members.rb#176 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#228 +# source://rbs//lib/rbs/ast/members.rb#230 class RBS::AST::Members::Extend < ::RBS::AST::Members::Base include ::RBS::AST::Members::Mixin - # source://rbs//lib/rbs/ast/members.rb#231 + # source://rbs//lib/rbs/ast/members.rb#233 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#213 +# source://rbs//lib/rbs/ast/members.rb#215 class RBS::AST::Members::Include < ::RBS::AST::Members::Base include ::RBS::AST::Members::Mixin - # source://rbs//lib/rbs/ast/members.rb#216 + # source://rbs//lib/rbs/ast/members.rb#218 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#143 +# source://rbs//lib/rbs/ast/members.rb#145 class RBS::AST::Members::InstanceVariable < ::RBS::AST::Members::Base include ::RBS::AST::Members::Var - # source://rbs//lib/rbs/ast/members.rb#146 + # source://rbs//lib/rbs/ast/members.rb#148 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#363 +# source://rbs//lib/rbs/ast/members.rb#365 module RBS::AST::Members::LocationOnly - # source://rbs//lib/rbs/ast/members.rb#366 + # source://rbs//lib/rbs/ast/members.rb#368 def initialize(location:); end - # source://rbs//lib/rbs/ast/members.rb#370 + # source://rbs//lib/rbs/ast/members.rb#372 def ==(other); end - # source://rbs//lib/rbs/ast/members.rb#370 + # source://rbs//lib/rbs/ast/members.rb#376 def eql?(other); end - # source://rbs//lib/rbs/ast/members.rb#376 + # source://rbs//lib/rbs/ast/members.rb#378 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/members.rb#364 + # source://rbs//lib/rbs/ast/members.rb#366 def location; end end @@ -831,77 +855,77 @@ end class RBS::AST::Members::MethodDefinition < ::RBS::AST::Members::Base # @return [MethodDefinition] a new instance of MethodDefinition # - # source://rbs//lib/rbs/ast/members.rb#53 + # source://rbs//lib/rbs/ast/members.rb#55 def initialize(name:, kind:, overloads:, annotations:, location:, comment:, overloading:, visibility:); end - # source://rbs//lib/rbs/ast/members.rb#64 + # source://rbs//lib/rbs/ast/members.rb#66 def ==(other); end # Returns the value of attribute annotations. # - # source://rbs//lib/rbs/ast/members.rb#47 + # source://rbs//lib/rbs/ast/members.rb#49 def annotations; end # Returns the value of attribute comment. # - # source://rbs//lib/rbs/ast/members.rb#49 + # source://rbs//lib/rbs/ast/members.rb#51 def comment; end - # source://rbs//lib/rbs/ast/members.rb#64 + # source://rbs//lib/rbs/ast/members.rb#75 def eql?(other); end - # source://rbs//lib/rbs/ast/members.rb#75 + # source://rbs//lib/rbs/ast/members.rb#77 def hash; end # @return [Boolean] # - # source://rbs//lib/rbs/ast/members.rb#79 + # source://rbs//lib/rbs/ast/members.rb#81 def instance?; end # Returns the value of attribute kind. # - # source://rbs//lib/rbs/ast/members.rb#45 + # source://rbs//lib/rbs/ast/members.rb#47 def kind; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/members.rb#48 + # source://rbs//lib/rbs/ast/members.rb#50 def location; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/ast/members.rb#44 + # source://rbs//lib/rbs/ast/members.rb#46 def name; end # Returns the value of attribute overloading. # - # source://rbs//lib/rbs/ast/members.rb#50 + # source://rbs//lib/rbs/ast/members.rb#52 def overloading; end # @return [Boolean] # - # source://rbs//lib/rbs/ast/members.rb#87 + # source://rbs//lib/rbs/ast/members.rb#89 def overloading?; end # Returns the value of attribute overloads. # - # source://rbs//lib/rbs/ast/members.rb#46 + # source://rbs//lib/rbs/ast/members.rb#48 def overloads; end # @return [Boolean] # - # source://rbs//lib/rbs/ast/members.rb#83 + # source://rbs//lib/rbs/ast/members.rb#85 def singleton?; end - # source://rbs//lib/rbs/ast/members.rb#104 + # source://rbs//lib/rbs/ast/members.rb#106 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/ast/members.rb#91 + # source://rbs//lib/rbs/ast/members.rb#93 def update(name: T.unsafe(nil), kind: T.unsafe(nil), overloads: T.unsafe(nil), annotations: T.unsafe(nil), location: T.unsafe(nil), comment: T.unsafe(nil), overloading: T.unsafe(nil), visibility: T.unsafe(nil)); end # Returns the value of attribute visibility. # - # source://rbs//lib/rbs/ast/members.rb#51 + # source://rbs//lib/rbs/ast/members.rb#53 def visibility; end end @@ -920,7 +944,7 @@ class RBS::AST::Members::MethodDefinition::Overload # source://rbs//lib/rbs/ast/members.rb#11 def annotations; end - # source://rbs//lib/rbs/ast/members.rb#18 + # source://rbs//lib/rbs/ast/members.rb#26 def eql?(other); end # source://rbs//lib/rbs/ast/members.rb#22 @@ -934,264 +958,1406 @@ class RBS::AST::Members::MethodDefinition::Overload # source://rbs//lib/rbs/ast/members.rb#32 def sub(subst); end - # source://rbs//lib/rbs/ast/members.rb#36 + # source://rbs//lib/rbs/ast/members.rb#38 def to_json(state = T.unsafe(nil)); end # source://rbs//lib/rbs/ast/members.rb#28 def update(annotations: T.unsafe(nil), method_type: T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#185 +# source://rbs//lib/rbs/ast/members.rb#187 module RBS::AST::Members::Mixin - # source://rbs//lib/rbs/ast/members.rb#192 + # source://rbs//lib/rbs/ast/members.rb#194 def initialize(name:, args:, annotations:, location:, comment:); end - # source://rbs//lib/rbs/ast/members.rb#200 + # source://rbs//lib/rbs/ast/members.rb#202 def ==(other); end # Returns the value of attribute annotations. # - # source://rbs//lib/rbs/ast/members.rb#188 + # source://rbs//lib/rbs/ast/members.rb#190 def annotations; end # Returns the value of attribute args. # - # source://rbs//lib/rbs/ast/members.rb#187 + # source://rbs//lib/rbs/ast/members.rb#189 def args; end # Returns the value of attribute comment. # - # source://rbs//lib/rbs/ast/members.rb#190 + # source://rbs//lib/rbs/ast/members.rb#192 def comment; end # @return [Boolean] # - # source://rbs//lib/rbs/ast/members.rb#204 + # source://rbs//lib/rbs/ast/members.rb#206 def eql?(other); end - # source://rbs//lib/rbs/ast/members.rb#208 + # source://rbs//lib/rbs/ast/members.rb#210 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/members.rb#189 + # source://rbs//lib/rbs/ast/members.rb#191 def location; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/ast/members.rb#186 + # source://rbs//lib/rbs/ast/members.rb#188 def name; end end -# source://rbs//lib/rbs/ast/members.rb#243 +# source://rbs//lib/rbs/ast/members.rb#245 class RBS::AST::Members::Prepend < ::RBS::AST::Members::Base include ::RBS::AST::Members::Mixin - # source://rbs//lib/rbs/ast/members.rb#246 + # source://rbs//lib/rbs/ast/members.rb#248 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#389 +# source://rbs//lib/rbs/ast/members.rb#391 class RBS::AST::Members::Private < ::RBS::AST::Members::Base include ::RBS::AST::Members::LocationOnly - # source://rbs//lib/rbs/ast/members.rb#392 + # source://rbs//lib/rbs/ast/members.rb#394 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#381 +# source://rbs//lib/rbs/ast/members.rb#383 class RBS::AST::Members::Public < ::RBS::AST::Members::Base include ::RBS::AST::Members::LocationOnly - # source://rbs//lib/rbs/ast/members.rb#384 + # source://rbs//lib/rbs/ast/members.rb#386 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/ast/members.rb#119 +# source://rbs//lib/rbs/ast/members.rb#121 module RBS::AST::Members::Var - # source://rbs//lib/rbs/ast/members.rb#125 + # source://rbs//lib/rbs/ast/members.rb#127 def initialize(name:, type:, location:, comment:); end - # source://rbs//lib/rbs/ast/members.rb#132 + # source://rbs//lib/rbs/ast/members.rb#134 def ==(other); end # Returns the value of attribute comment. # - # source://rbs//lib/rbs/ast/members.rb#123 + # source://rbs//lib/rbs/ast/members.rb#125 def comment; end - # source://rbs//lib/rbs/ast/members.rb#132 + # source://rbs//lib/rbs/ast/members.rb#138 def eql?(other); end - # source://rbs//lib/rbs/ast/members.rb#138 + # source://rbs//lib/rbs/ast/members.rb#140 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/members.rb#122 + # source://rbs//lib/rbs/ast/members.rb#124 def location; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/ast/members.rb#120 + # source://rbs//lib/rbs/ast/members.rb#122 def name; end # Returns the value of attribute type. # - # source://rbs//lib/rbs/ast/members.rb#121 + # source://rbs//lib/rbs/ast/members.rb#123 def type; end end -# source://rbs//lib/rbs/ast/type_param.rb#5 -class RBS::AST::TypeParam - # @return [TypeParam] a new instance of TypeParam +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#5 +module RBS::AST::Ruby; end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#6 +module RBS::AST::Ruby::Annotations; end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#43 +class RBS::AST::Ruby::Annotations::AliasAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [AliasAnnotation] a new instance of AliasAnnotation # - # source://rbs//lib/rbs/ast/type_param.rb#8 - def initialize(name:, variance:, upper_bound:, location:, default_type: T.unsafe(nil)); end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#46 + def initialize(location:, prefix_location:, keyword_location:, type_name:, type_name_location:); end - # source://rbs//lib/rbs/ast/type_param.rb#33 - def ==(other); end + # Returns the value of attribute keyword_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#44 + def keyword_location; end - # Returns the value of attribute default_type. + # source://rbs//lib/rbs/ast/ruby/annotations.rb#53 + def map_type_name; end + + # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def default_type; end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#44 + def type_name; end - # source://rbs//lib/rbs/ast/type_param.rb#33 - def eql?(other); end + # Returns the value of attribute type_name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#44 + def type_name_location; end +end - # source://rbs//lib/rbs/ast/type_param.rb#44 - def hash; end +# source://rbs//lib/rbs/ast/ruby/annotations.rb#7 +class RBS::AST::Ruby::Annotations::Base + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#10 + def initialize(location, prefix_location); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#15 + def buffer; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/ast/type_param.rb#6 + # source://rbs//lib/rbs/ast/ruby/annotations.rb#8 def location; end - # source://rbs//lib/rbs/ast/type_param.rb#69 - def map_type(&block); end + # Returns the value of attribute prefix_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#8 + def prefix_location; end +end - # Returns the value of attribute name. +# source://rbs//lib/rbs/ast/ruby/annotations.rb#356 +class RBS::AST::Ruby::Annotations::BlockParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [BlockParamTypeAnnotation] a new instance of BlockParamTypeAnnotation # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def name; end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#359 + def initialize(location:, prefix_location:, ampersand_location:, name_location:, colon_location:, question_location:, type_location:, type:, comment_location:); end - # source://rbs//lib/rbs/ast/type_param.rb#59 - def rename(name); end + # Returns the value of attribute ampersand_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#357 + def ampersand_location; end - # source://rbs//lib/rbs/ast/type_param.rb#48 - def to_json(state = T.unsafe(nil)); end + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#357 + def colon_location; end - # source://rbs//lib/rbs/ast/type_param.rb#127 - def to_s; end + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#357 + def comment_location; end - # source://rbs//lib/rbs/ast/type_param.rb#24 - def unchecked!(value = T.unsafe(nil)); end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#370 + def map_type_name(&block); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#384 + def name; end + + # Returns the value of attribute name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#357 + def name_location; end # @return [Boolean] # - # source://rbs//lib/rbs/ast/type_param.rb#29 - def unchecked?; end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#388 + def optional?; end - # source://rbs//lib/rbs/ast/type_param.rb#17 - def upper_bound; end + # Returns the value of attribute question_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#357 + def question_location; end - # Returns the value of attribute upper_bound_type. + # @return [Boolean] # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def upper_bound_type; end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#392 + def required?; end - # Returns the value of attribute variance. + # Returns the value of attribute type. # - # source://rbs//lib/rbs/ast/type_param.rb#6 - def variance; end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#357 + def type; end - class << self - # source://rbs//lib/rbs/ast/type_param.rb#156 - def application(params, args); end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#396 + def type_fingerprint; end - # source://rbs//lib/rbs/ast/type_param.rb#188 - def normalize_args(params, args); end + # Returns the value of attribute type_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#357 + def type_location; end +end - # source://rbs//lib/rbs/ast/type_param.rb#109 - def rename(params, new_names:); end +# source://rbs//lib/rbs/ast/ruby/annotations.rb#64 +class RBS::AST::Ruby::Annotations::ClassAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # source://rbs//lib/rbs/ast/ruby/annotations.rb#65 + def type_fingerprint; end +end - # source://rbs//lib/rbs/ast/type_param.rb#87 - def resolve_variables(params); end +# source://rbs//lib/rbs/ast/ruby/annotations.rb#82 +class RBS::AST::Ruby::Annotations::ColonMethodTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [ColonMethodTypeAnnotation] a new instance of ColonMethodTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#85 + def initialize(location:, prefix_location:, annotations:, method_type:); end - # source://rbs//lib/rbs/ast/type_param.rb#97 - def subst_var(vars, type); end + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#83 + def annotations; end - # source://rbs//lib/rbs/ast/type_param.rb#209 - def validate(type_params); end - end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#91 + def map_type_name; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#83 + def method_type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#100 + def type_fingerprint; end end -# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). -# -# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. -# -# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for -# different node types. -# -# Example usage: -# -# ~~~rb -# class MyVisitor < RBS::AST::Visitor -# def visit_declaration_class(node) -# puts "Visiting class: #{node.name}" -# -# super # call `super` to run the default visiting behavior -# end -# end -# -# visitor = MyVisitor.new -# visitor.visit(ast_node) -# ~~~ -# -# source://rbs//lib/rbs/ast/visitor.rb#26 -class RBS::AST::Visitor - # source://rbs//lib/rbs/ast/visitor.rb#27 - def visit(node); end +# source://rbs//lib/rbs/ast/ruby/annotations.rb#322 +class RBS::AST::Ruby::Annotations::DoubleSplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [DoubleSplatParamTypeAnnotation] a new instance of DoubleSplatParamTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#325 + def initialize(location:, prefix_location:, star2_location:, name_location:, colon_location:, param_type:, comment_location:); end - # source://rbs//lib/rbs/ast/visitor.rb#70 - def visit_all(nodes); end + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#323 + def colon_location; end - # source://rbs//lib/rbs/ast/visitor.rb#79 - def visit_declaration_class(node); end + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#323 + def comment_location; end - # source://rbs//lib/rbs/ast/visitor.rb#87 - def visit_declaration_constant(node); end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#334 + def map_type_name(&block); end - # source://rbs//lib/rbs/ast/visitor.rb#76 - def visit_declaration_global(node); end + # Returns the value of attribute name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#323 + def name_location; end - # source://rbs//lib/rbs/ast/visitor.rb#93 - def visit_declaration_interface(node); end + # Returns the value of attribute param_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#323 + def param_type; end - # source://rbs//lib/rbs/ast/visitor.rb#83 - def visit_declaration_module(node); end + # Returns the value of attribute star2_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#323 + def star2_location; end - # source://rbs//lib/rbs/ast/visitor.rb#90 - def visit_declaration_type_alias(node); end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#346 + def type_fingerprint; end +end - # source://rbs//lib/rbs/ast/visitor.rb#97 - def visit_member_alias(node); end +# source://rbs//lib/rbs/ast/ruby/annotations.rb#222 +class RBS::AST::Ruby::Annotations::InstanceVariableAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [InstanceVariableAnnotation] a new instance of InstanceVariableAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#225 + def initialize(location:, prefix_location:, ivar_name:, ivar_name_location:, colon_location:, type:, comment_location:); end - # source://rbs//lib/rbs/ast/visitor.rb#124 - def visit_member_attr_accessor(node); end + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#223 + def colon_location; end - # source://rbs//lib/rbs/ast/visitor.rb#118 - def visit_member_attr_reader(node); end + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#223 + def comment_location; end - # source://rbs//lib/rbs/ast/visitor.rb#121 - def visit_member_attr_writer(node); end + # Returns the value of attribute ivar_name. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#223 + def ivar_name; end - # source://rbs//lib/rbs/ast/visitor.rb#100 - def visit_member_class_instance_variable(node); end + # Returns the value of attribute ivar_name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#223 + def ivar_name_location; end - # source://rbs//lib/rbs/ast/visitor.rb#103 - def visit_member_class_variable(node); end + # source://rbs//lib/rbs/ast/ruby/annotations.rb#234 + def map_type_name(&block); end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#223 + def type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#246 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#109 +class RBS::AST::Ruby::Annotations::MethodTypesAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [MethodTypesAnnotation] a new instance of MethodTypesAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#114 + def initialize(location:, prefix_location:, overloads:, vertical_bar_locations:, dot3_location:); end + + # Returns the value of attribute dot3_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#112 + def dot3_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#121 + def map_type_name(&block); end + + # Returns the value of attribute overloads. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#112 + def overloads; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#132 + def type_fingerprint; end + + # Returns the value of attribute vertical_bar_locations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#112 + def vertical_bar_locations; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#110 +RBS::AST::Ruby::Annotations::MethodTypesAnnotation::Overload = RBS::AST::Members::MethodDefinition::Overload + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#73 +class RBS::AST::Ruby::Annotations::ModuleAliasAnnotation < ::RBS::AST::Ruby::Annotations::AliasAnnotation + # source://rbs//lib/rbs/ast/ruby/annotations.rb#74 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#20 +class RBS::AST::Ruby::Annotations::NodeTypeAssertion < ::RBS::AST::Ruby::Annotations::Base + # @return [NodeTypeAssertion] a new instance of NodeTypeAssertion + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#23 + def initialize(location:, prefix_location:, type:); end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#28 + def map_type_name; end + + # Returns the value of attribute type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#21 + def type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#35 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#256 +class RBS::AST::Ruby::Annotations::ParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [ParamTypeAnnotation] a new instance of ParamTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#259 + def initialize(location:, prefix_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#257 + def colon_location; end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#257 + def comment_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#267 + def map_type_name(&block); end + + # Returns the value of attribute name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#257 + def name_location; end + + # Returns the value of attribute param_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#257 + def param_type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#278 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#155 +class RBS::AST::Ruby::Annotations::ReturnTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [ReturnTypeAnnotation] a new instance of ReturnTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#164 + def initialize(location:, prefix_location:, return_location:, colon_location:, return_type:, comment_location:); end + + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#158 + def colon_location; end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#162 + def comment_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#172 + def map_type_name(&block); end + + # Returns the value of attribute return_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#156 + def return_location; end + + # Returns the value of attribute return_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#160 + def return_type; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#183 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#141 +class RBS::AST::Ruby::Annotations::SkipAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [SkipAnnotation] a new instance of SkipAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#144 + def initialize(location:, prefix_location:, skip_location:, comment_location:); end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#142 + def comment_location; end + + # Returns the value of attribute skip_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#142 + def skip_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#150 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#288 +class RBS::AST::Ruby::Annotations::SplatParamTypeAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [SplatParamTypeAnnotation] a new instance of SplatParamTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#291 + def initialize(location:, prefix_location:, star_location:, name_location:, colon_location:, param_type:, comment_location:); end + + # Returns the value of attribute colon_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#289 + def colon_location; end + + # Returns the value of attribute comment_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#289 + def comment_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#300 + def map_type_name(&block); end + + # Returns the value of attribute name_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#289 + def name_location; end + + # Returns the value of attribute param_type. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#289 + def param_type; end + + # Returns the value of attribute star_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#289 + def star_location; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#312 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/annotations.rb#192 +class RBS::AST::Ruby::Annotations::TypeApplicationAnnotation < ::RBS::AST::Ruby::Annotations::Base + # @return [TypeApplicationAnnotation] a new instance of TypeApplicationAnnotation + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#195 + def initialize(location:, prefix_location:, type_args:, close_bracket_location:, comma_locations:); end + + # Returns the value of attribute close_bracket_location. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#193 + def close_bracket_location; end + + # Returns the value of attribute comma_locations. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#193 + def comma_locations; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#202 + def map_type_name(&block); end + + # Returns the value of attribute type_args. + # + # source://rbs//lib/rbs/ast/ruby/annotations.rb#193 + def type_args; end + + # source://rbs//lib/rbs/ast/ruby/annotations.rb#214 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#6 +class RBS::AST::Ruby::CommentBlock + # @return [CommentBlock] a new instance of CommentBlock + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#9 + def initialize(source_buffer, comments); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#226 + def as_comment; end + + # Returns the value of attribute comment_buffer. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def comment_buffer; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#211 + def comments; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#98 + def each_paragraph(variables, &block); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#50 + def end_line; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#36 + def leading?; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#215 + def leading_annotation?(index); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#174 + def line_location(start_line, end_line); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#54 + def line_starts; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#180 + def location; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def name; end + + # Returns the value of attribute offsets. + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#7 + def offsets; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#187 + def parse_annotation_lines(start_line, end_line, variables); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#46 + def start_line; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#169 + def text(comment_index); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#41 + def trailing?; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#197 + def trailing_annotation(variables); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#130 + def yield_annotation(start_line, end_line, current_line, variables, &block); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#110 + def yield_paragraph(start_line, current_line, variables, &block); end + + class << self + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#60 + def build(buffer, comments); end + end +end + +# source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 +class RBS::AST::Ruby::CommentBlock::AnnotationSyntaxError < ::Struct + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def error; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def error=(_); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def location; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def location=(_); end + + class << self + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def [](*_arg0); end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def inspect; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def keyword_init?; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def members; end + + # source://rbs//lib/rbs/ast/ruby/comment_block.rb#96 + def new(*_arg0); end + end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#6 +module RBS::AST::Ruby::Declarations; end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#7 +class RBS::AST::Ruby::Declarations::Base + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#13 + def initialize(buffer); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#8 + def buffer; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#18 +class RBS::AST::Ruby::Declarations::ClassDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ClassDecl] a new instance of ClassDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#74 + def initialize(buffer, name, node, super_class); end + + # Returns the value of attribute class_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#66 + def class_name; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#82 + def each_decl(&block); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#94 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#68 + def members; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#98 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#70 + def node; end + + # Returns the value of attribute super_class. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#72 + def super_class; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#102 + def type_fingerprint; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#92 + def type_params; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#19 +class RBS::AST::Ruby::Declarations::ClassDecl::SuperClass + # @return [SuperClass] a new instance of SuperClass + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#28 + def initialize(type_name_location, operator_location, type_name, type_annotation); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#56 + def args; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#43 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#55 + def name; end + + # Returns the value of attribute operator_location. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#22 + def operator_location; end + + # Returns the value of attribute type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#26 + def type_annotation; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#35 + def type_args; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#58 + def type_fingerprint; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#24 + def type_name; end + + # Returns the value of attribute type_name_location. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#20 + def type_name_location; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#223 +class RBS::AST::Ruby::Declarations::ClassModuleAliasDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ClassModuleAliasDecl] a new instance of ClassModuleAliasDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#230 + def initialize(buffer, node, new_name, infered_old_name, leading_comment, annotation); end + + # Returns the value of attribute annotation. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#228 + def annotation; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#264 + def comment; end + + # Returns the value of attribute infered_old_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#227 + def infered_old_name; end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#225 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#239 + def location; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#243 + def name_location; end + + # Returns the value of attribute new_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#226 + def new_name; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#224 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#252 + def old_name; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#268 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#161 +class RBS::AST::Ruby::Declarations::ConstantDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ConstantDecl] a new instance of ConstantDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#167 + def initialize(buffer, constant_name, node, leading_comment, type_annotation); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#209 + def comment; end + + # Returns the value of attribute constant_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#163 + def constant_name; end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#162 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#175 + def location; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#179 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#164 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#188 + def type; end + + # Returns the value of attribute type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#165 + def type_annotation; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#213 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/declarations.rb#114 +class RBS::AST::Ruby::Declarations::ModuleDecl < ::RBS::AST::Ruby::Declarations::Base + # @return [ModuleDecl] a new instance of ModuleDecl + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#121 + def initialize(buffer, name, node); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#128 + def each_decl(&block); end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#142 + def location; end + + # Returns the value of attribute members. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#117 + def members; end + + # Returns the value of attribute module_name. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#115 + def module_name; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#146 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/declarations.rb#119 + def node; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#140 + def self_types; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#150 + def type_fingerprint; end + + # source://rbs//lib/rbs/ast/ruby/declarations.rb#138 + def type_params; end +end + +# source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#6 +module RBS::AST::Ruby::Helpers; end + +# source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#7 +module RBS::AST::Ruby::Helpers::ConstantHelper + private + + # source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#10 + def constant_as_type_name(node); end + + class << self + # source://rbs//lib/rbs/ast/ruby/helpers/constant_helper.rb#10 + def constant_as_type_name(node); end + end +end + +# source://rbs//lib/rbs/ast/ruby/helpers/location_helper.rb#7 +module RBS::AST::Ruby::Helpers::LocationHelper + # source://rbs//lib/rbs/ast/ruby/helpers/location_helper.rb#8 + def rbs_location(location); end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#6 +module RBS::AST::Ruby::Members; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#690 +class RBS::AST::Ruby::Members::AttrAccessorMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#684 +class RBS::AST::Ruby::Members::AttrReaderMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#687 +class RBS::AST::Ruby::Members::AttrWriterMember < ::RBS::AST::Ruby::Members::AttributeMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#639 +class RBS::AST::Ruby::Members::AttributeMember < ::RBS::AST::Ruby::Members::Base + # @return [AttributeMember] a new instance of AttributeMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#645 + def initialize(buffer, node, name_nodes, leading_comment, type_annotation); end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#643 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#659 + def location; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#663 + def name_locations; end + + # Returns the value of attribute name_nodes. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#641 + def name_nodes; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#653 + def names; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#640 + def node; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#669 + def type; end + + # Returns the value of attribute type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#642 + def type_annotation; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#673 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#7 +class RBS::AST::Ruby::Members::Base + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/ast/ruby/members.rb#10 + def initialize(buffer); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#8 + def buffer; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#547 +class RBS::AST::Ruby::Members::DefMember < ::RBS::AST::Ruby::Members::Base + # @return [DefMember] a new instance of DefMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#555 + def initialize(buffer, name, node, method_type, leading_comment); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#575 + def annotations; end + + # Returns the value of attribute leading_comment. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#553 + def leading_comment; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#563 + def location; end + + # Returns the value of attribute method_type. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#552 + def method_type; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#550 + def name; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#579 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#551 + def node; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/members.rb#571 + def overloading?; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#567 + def overloads; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#583 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#548 +RBS::AST::Ruby::Members::DefMember::Overload = RBS::AST::Members::MethodDefinition::Overload + +# source://rbs//lib/rbs/ast/ruby/members.rb#633 +class RBS::AST::Ruby::Members::ExtendMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#630 +class RBS::AST::Ruby::Members::IncludeMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# source://rbs//lib/rbs/ast/ruby/members.rb#693 +class RBS::AST::Ruby::Members::InstanceVariableMember < ::RBS::AST::Ruby::Members::Base + # @return [InstanceVariableMember] a new instance of InstanceVariableMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#696 + def initialize(buffer, annotation); end + + # Returns the value of attribute annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#694 + def annotation; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#709 + def location; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#701 + def name; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#705 + def type; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#713 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#17 +class RBS::AST::Ruby::Members::MethodTypeAnnotation + # @return [MethodTypeAnnotation] a new instance of MethodTypeAnnotation + # + # source://rbs//lib/rbs/ast/ruby/members.rb#403 + def initialize(type_annotations:); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/members.rb#484 + def empty?; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#407 + def map_type_name(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/ruby/members.rb#524 + def overloading?; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#488 + def overloads; end + + # Returns the value of attribute type_annotations. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#401 + def type_annotations; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#535 + def type_fingerprint; end + + class << self + # source://rbs//lib/rbs/ast/ruby/members.rb#420 + def build(leading_block, trailing_block, variables, node); end + end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#18 +class RBS::AST::Ruby::Members::MethodTypeAnnotation::DocStyle + # @return [DocStyle] a new instance of DocStyle + # + # source://rbs//lib/rbs/ast/ruby/members.rb#29 + def initialize; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#181 + def all_param_annotations; end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#27 + def block; end + + # Sets the attribute block + # + # @param value the value to set the attribute block to. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#27 + def block=(_arg0); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#196 + def map_type_name(&block); end + + # source://rbs//lib/rbs/ast/ruby/members.rb#287 + def method_type; end + + # Returns the value of attribute optional_keywords. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#25 + def optional_keywords; end + + # Returns the value of attribute optional_positionals. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#21 + def optional_positionals; end + + # Returns the value of attribute required_keywords. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#24 + def required_keywords; end + + # Returns the value of attribute required_positionals. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#20 + def required_positionals; end + + # Returns the value of attribute rest_keywords. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#26 + def rest_keywords; end + + # Sets the attribute rest_keywords + # + # @param value the value to set the attribute rest_keywords to. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#26 + def rest_keywords=(_arg0); end + + # Returns the value of attribute rest_positionals. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#22 + def rest_positionals; end + + # Sets the attribute rest_positionals + # + # @param value the value to set the attribute rest_positionals to. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#22 + def rest_positionals=(_arg0); end + + # Returns the value of attribute return_type_annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#19 + def return_type_annotation; end + + # Sets the attribute return_type_annotation + # + # @param value the value to set the attribute return_type_annotation to. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#19 + def return_type_annotation=(_arg0); end + + # Returns the value of attribute trailing_positionals. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#23 + def trailing_positionals; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#273 + def type_fingerprint; end + + class << self + # source://rbs//lib/rbs/ast/ruby/members.rb#41 + def build(param_type_annotations, return_type_annotation, node); end + end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#593 +class RBS::AST::Ruby::Members::MixinMember < ::RBS::AST::Ruby::Members::Base + # @return [MixinMember] a new instance of MixinMember + # + # source://rbs//lib/rbs/ast/ruby/members.rb#598 + def initialize(buffer, node, module_name, annotation); end + + # Returns the value of attribute annotation. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#596 + def annotation; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#605 + def location; end + + # Returns the value of attribute module_name. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#595 + def module_name; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#609 + def name_location; end + + # Returns the value of attribute node. + # + # source://rbs//lib/rbs/ast/ruby/members.rb#594 + def node; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#616 + def type_args; end + + # source://rbs//lib/rbs/ast/ruby/members.rb#620 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/ast/ruby/members.rb#636 +class RBS::AST::Ruby::Members::PrependMember < ::RBS::AST::Ruby::Members::MixinMember; end + +# source://rbs//lib/rbs/ast/type_param.rb#5 +class RBS::AST::TypeParam + # @return [TypeParam] a new instance of TypeParam + # + # source://rbs//lib/rbs/ast/type_param.rb#8 + def initialize(name:, variance:, upper_bound:, lower_bound:, location:, default_type: T.unsafe(nil), unchecked: T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/type_param.rb#41 + def ==(other); end + + # Returns the value of attribute default_type. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def default_type; end + + # source://rbs//lib/rbs/ast/type_param.rb#51 + def eql?(other); end + + # source://rbs//lib/rbs/ast/type_param.rb#53 + def hash; end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def location; end + + # source://rbs//lib/rbs/ast/type_param.rb#25 + def lower_bound; end + + # Returns the value of attribute lower_bound_type. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def lower_bound_type; end + + # source://rbs//lib/rbs/ast/type_param.rb#69 + def map_type(&block); end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def name; end + + # source://rbs//lib/rbs/ast/type_param.rb#57 + def to_json(state = T.unsafe(nil)); end + + # source://rbs//lib/rbs/ast/type_param.rb#133 + def to_s; end + + # source://rbs//lib/rbs/ast/type_param.rb#32 + def unchecked!(value = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/ast/type_param.rb#37 + def unchecked?; end + + # source://rbs//lib/rbs/ast/type_param.rb#18 + def upper_bound; end + + # Returns the value of attribute upper_bound_type. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def upper_bound_type; end + + # Returns the value of attribute variance. + # + # source://rbs//lib/rbs/ast/type_param.rb#6 + def variance; end + + class << self + # source://rbs//lib/rbs/ast/type_param.rb#166 + def application(params, args); end + + # source://rbs//lib/rbs/ast/type_param.rb#198 + def normalize_args(params, args); end + + # source://rbs//lib/rbs/ast/type_param.rb#114 + def rename(params, new_names:); end + + # source://rbs//lib/rbs/ast/type_param.rb#92 + def resolve_variables(params); end + + # source://rbs//lib/rbs/ast/type_param.rb#102 + def subst_var(vars, type); end + + # source://rbs//lib/rbs/ast/type_param.rb#219 + def validate(type_params); end + end +end + +# The Visitor class implements the Visitor pattern for traversing the RBS Abstract Syntax Tree (AST). +# +# It provides methods to visit each type of node in the AST, allowing for custom processing of each node type. +# +# This class is designed to be subclassed, with specific visit methods overridden to implement custom behavior for +# different node types. +# +# Example usage: +# +# ~~~rb +# class MyVisitor < RBS::AST::Visitor +# def visit_declaration_class(node) +# puts "Visiting class: #{node.name}" +# +# super # call `super` to run the default visiting behavior +# end +# end +# +# visitor = MyVisitor.new +# visitor.visit(ast_node) +# ~~~ +# +# source://rbs//lib/rbs/ast/visitor.rb#26 +class RBS::AST::Visitor + # source://rbs//lib/rbs/ast/visitor.rb#27 + def visit(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#70 + def visit_all(nodes); end + + # source://rbs//lib/rbs/ast/visitor.rb#79 + def visit_declaration_class(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#87 + def visit_declaration_constant(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#76 + def visit_declaration_global(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#93 + def visit_declaration_interface(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#83 + def visit_declaration_module(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#90 + def visit_declaration_type_alias(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#97 + def visit_member_alias(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#124 + def visit_member_attr_accessor(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#118 + def visit_member_attr_reader(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#121 + def visit_member_attr_writer(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#100 + def visit_member_class_instance_variable(node); end + + # source://rbs//lib/rbs/ast/visitor.rb#103 + def visit_member_class_variable(node); end # source://rbs//lib/rbs/ast/visitor.rb#133 def visit_member_extend(node); end @@ -1266,28 +2432,52 @@ end # source://rbs//lib/rbs/ancestor_graph.rb#5 class RBS::AncestorGraph::InstanceNode < ::Struct + # source://rbs//lib/rbs/ancestor_graph.rb#5 def type_name; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 def type_name=(_); end class << self + # source://rbs//lib/rbs/ancestor_graph.rb#5 def [](*_arg0); end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 def inspect; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 def keyword_init?; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 def members; end + + # source://rbs//lib/rbs/ancestor_graph.rb#5 def new(*_arg0); end end end # source://rbs//lib/rbs/ancestor_graph.rb#6 class RBS::AncestorGraph::SingletonNode < ::Struct + # source://rbs//lib/rbs/ancestor_graph.rb#6 def type_name; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 def type_name=(_); end class << self + # source://rbs//lib/rbs/ancestor_graph.rb#6 def [](*_arg0); end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 def inspect; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 def keyword_init?; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 def members; end + + # source://rbs//lib/rbs/ancestor_graph.rb#6 def new(*_arg0); end end end @@ -1299,24 +2489,33 @@ class RBS::BaseError < ::StandardError; end class RBS::Buffer # @return [Buffer] a new instance of Buffer # - # source://rbs//lib/rbs/buffer.rb#8 - def initialize(name:, content:); end + # source://rbs//lib/rbs/buffer.rb#9 + def initialize(content:, name: T.unsafe(nil), parent: T.unsafe(nil)); end + + # source://rbs//lib/rbs/buffer.rb#131 + def absolute_position(position); end # Returns the value of attribute content. # # source://rbs//lib/rbs/buffer.rb#6 def content; end - # source://rbs//lib/rbs/buffer.rb#63 + # source://rbs//lib/rbs/buffer.rb#148 + def detach; end + + # source://rbs//lib/rbs/buffer.rb#86 def inspect; end - # source://rbs//lib/rbs/buffer.rb#59 + # source://rbs//lib/rbs/buffer.rb#78 def last_position; end - # source://rbs//lib/rbs/buffer.rb#13 + # source://rbs//lib/rbs/buffer.rb#26 + def line_count; end + + # source://rbs//lib/rbs/buffer.rb#22 def lines; end - # source://rbs//lib/rbs/buffer.rb#49 + # source://rbs//lib/rbs/buffer.rb#68 def loc_to_pos(loc); end # Returns the value of attribute name. @@ -1324,11 +2523,31 @@ class RBS::Buffer # source://rbs//lib/rbs/buffer.rb#5 def name; end - # source://rbs//lib/rbs/buffer.rb#37 + # Returns the value of attribute parent. + # + # source://rbs//lib/rbs/buffer.rb#7 + def parent; end + + # source://rbs//lib/rbs/buffer.rb#116 + def parent_buffer; end + + # source://rbs//lib/rbs/buffer.rb#122 + def parent_position(position); end + + # source://rbs//lib/rbs/buffer.rb#56 def pos_to_loc(pos); end - # source://rbs//lib/rbs/buffer.rb#17 + # source://rbs//lib/rbs/buffer.rb#30 def ranges; end + + # source://rbs//lib/rbs/buffer.rb#90 + def rbs_location(location, loc2 = T.unsafe(nil)); end + + # source://rbs//lib/rbs/buffer.rb#98 + def sub_buffer(lines:); end + + # source://rbs//lib/rbs/buffer.rb#140 + def top_buffer; end end # source://rbs//lib/rbs/builtin_names.rb#4 @@ -1475,6 +2694,12 @@ class RBS::CLI::ColoredIO def can_display_colors?; end end +# source://rbs//lib/rbs/errors.rb#345 +class RBS::ClassInstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # source://rbs//lib/rbs/errors.rb#346 + def kind; end +end + # source://rbs//lib/rbs/collection/sources/base.rb#4 module RBS::Collection; end @@ -1623,61 +2848,61 @@ end class RBS::Collection::Config::LockfileGenerator # @return [LockfileGenerator] a new instance of LockfileGenerator # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#33 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#48 def initialize(config:, definition:, with_lockfile:); end # Returns the value of attribute config. # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#40 def config; end # Returns the value of attribute definition. # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#40 def definition; end # Returns the value of attribute existing_lockfile. # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#40 def existing_lockfile; end # Returns the value of attribute gem_entries. # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#40 def gem_entries; end # Returns the value of attribute gem_hash. # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#40 def gem_hash; end - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#61 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#76 def generate; end # Returns the value of attribute lockfile. # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#40 def lockfile; end private - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#94 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#109 def assign_gem(name:, version:, skip: T.unsafe(nil)); end - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#160 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#175 def assign_stdlib(name:, from_gem: T.unsafe(nil)); end - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#213 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#246 def find_best_version(version:, versions:); end - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#207 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#240 def find_source(name:); end - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#86 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#101 def validate_gemfile_lock_path!(lock:, gemfile_lock_path:); end class << self - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#27 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#42 def generate(config:, definition:, with_lockfile: T.unsafe(nil)); end end end @@ -1685,14 +2910,14 @@ end # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#7 RBS::Collection::Config::LockfileGenerator::ALUMNI_STDLIBS = T.let(T.unsafe(nil), Hash) -# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#9 +# source://rbs//lib/rbs/collection/config/lockfile_generator.rb#24 class RBS::Collection::Config::LockfileGenerator::GemfileLockMismatchError < ::StandardError # @return [GemfileLockMismatchError] a new instance of GemfileLockMismatchError # - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#10 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#25 def initialize(expected:, actual:); end - # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#15 + # source://rbs//lib/rbs/collection/config/lockfile_generator.rb#30 def message; end end @@ -1734,113 +2959,113 @@ module RBS::Collection::Sources::Base def dependencies_of(name, version); end end -# source://rbs//lib/rbs/collection/sources/git.rb#10 +# source://rbs//lib/rbs/collection/sources/git.rb#11 class RBS::Collection::Sources::Git include ::RBS::Collection::Sources::Base # @return [Git] a new instance of Git # - # source://rbs//lib/rbs/collection/sources/git.rb#18 + # source://rbs//lib/rbs/collection/sources/git.rb#19 def initialize(name:, revision:, remote:, repo_dir:); end # @return [Boolean] # - # source://rbs//lib/rbs/collection/sources/git.rb#26 + # source://rbs//lib/rbs/collection/sources/git.rb#27 def has?(name, version); end - # source://rbs//lib/rbs/collection/sources/git.rb#43 + # source://rbs//lib/rbs/collection/sources/git.rb#44 def install(dest:, name:, version:, stdout:); end - # source://rbs//lib/rbs/collection/sources/git.rb#223 + # source://rbs//lib/rbs/collection/sources/git.rb#224 def load_metadata(dir:); end - # source://rbs//lib/rbs/collection/sources/git.rb#73 + # source://rbs//lib/rbs/collection/sources/git.rb#74 def manifest_of(name, version); end - # source://rbs//lib/rbs/collection/sources/git.rb#207 + # source://rbs//lib/rbs/collection/sources/git.rb#208 def metadata_content(name:, version:); end # Returns the value of attribute name. # - # source://rbs//lib/rbs/collection/sources/git.rb#16 + # source://rbs//lib/rbs/collection/sources/git.rb#17 def name; end # Returns the value of attribute remote. # - # source://rbs//lib/rbs/collection/sources/git.rb#16 + # source://rbs//lib/rbs/collection/sources/git.rb#17 def remote; end # Returns the value of attribute repo_dir. # - # source://rbs//lib/rbs/collection/sources/git.rb#16 + # source://rbs//lib/rbs/collection/sources/git.rb#17 def repo_dir; end - # source://rbs//lib/rbs/collection/sources/git.rb#172 + # source://rbs//lib/rbs/collection/sources/git.rb#173 def resolved_revision; end # Returns the value of attribute revision. # - # source://rbs//lib/rbs/collection/sources/git.rb#16 + # source://rbs//lib/rbs/collection/sources/git.rb#17 def revision; end - # source://rbs//lib/rbs/collection/sources/git.rb#113 + # source://rbs//lib/rbs/collection/sources/git.rb#114 def to_lockfile; end - # source://rbs//lib/rbs/collection/sources/git.rb#36 + # source://rbs//lib/rbs/collection/sources/git.rb#37 def versions(name); end - # source://rbs//lib/rbs/collection/sources/git.rb#215 + # source://rbs//lib/rbs/collection/sources/git.rb#216 def write_metadata(dir:, name:, version:); end private - # source://rbs//lib/rbs/collection/sources/git.rb#87 + # source://rbs//lib/rbs/collection/sources/git.rb#88 def _install(dest:, name:, version:); end # @return [Boolean] # - # source://rbs//lib/rbs/collection/sources/git.rb#183 + # source://rbs//lib/rbs/collection/sources/git.rb#184 def commit_hash?; end - # source://rbs//lib/rbs/collection/sources/git.rb#99 + # source://rbs//lib/rbs/collection/sources/git.rb#100 def cp_r(src, dest); end - # source://rbs//lib/rbs/collection/sources/git.rb#123 + # source://rbs//lib/rbs/collection/sources/git.rb#124 def format_config_entry(name, version); end - # source://rbs//lib/rbs/collection/sources/git.rb#168 + # source://rbs//lib/rbs/collection/sources/git.rb#169 def gem_repo_dir; end - # source://rbs//lib/rbs/collection/sources/git.rb#229 + # source://rbs//lib/rbs/collection/sources/git.rb#230 def gems_versions; end - # source://rbs//lib/rbs/collection/sources/git.rb#187 + # source://rbs//lib/rbs/collection/sources/git.rb#188 def git(*cmd, **opt); end # @return [Boolean] # - # source://rbs//lib/rbs/collection/sources/git.rb#191 + # source://rbs//lib/rbs/collection/sources/git.rb#192 def git?(*cmd, **opt); end - # source://rbs//lib/rbs/collection/sources/git.rb#158 + # source://rbs//lib/rbs/collection/sources/git.rb#159 def git_dir; end # @return [Boolean] # - # source://rbs//lib/rbs/collection/sources/git.rb#152 + # source://rbs//lib/rbs/collection/sources/git.rb#153 def need_to_fetch?(revision); end - # source://rbs//lib/rbs/collection/sources/git.rb#130 + # source://rbs//lib/rbs/collection/sources/git.rb#131 def setup!; end - # source://rbs//lib/rbs/collection/sources/git.rb#197 + # source://rbs//lib/rbs/collection/sources/git.rb#198 def sh!(*cmd, **opt); end end -# source://rbs//lib/rbs/collection/sources/git.rb#14 +# source://rbs//lib/rbs/collection/sources/git.rb#15 class RBS::Collection::Sources::Git::CommandError < ::StandardError; end -# source://rbs//lib/rbs/collection/sources/git.rb#12 +# source://rbs//lib/rbs/collection/sources/git.rb#13 RBS::Collection::Sources::Git::METADATA_FILENAME = T.let(T.unsafe(nil), String) # source://rbs//lib/rbs/collection/sources/local.rb#6 @@ -1889,7 +3114,7 @@ class RBS::Collection::Sources::Local def _install(src, dst); end end -# Signatures that are inclduded in gem package as sig/ directory. +# Signatures that are included in gem package as sig/ directory. # # source://rbs//lib/rbs/collection/sources/rubygems.rb#9 class RBS::Collection::Sources::Rubygems @@ -1922,7 +3147,10 @@ class RBS::Collection::Sources::Rubygems class << self private + # source://rbs//lib/rbs/collection/sources/rubygems.rb#11 def allocate; end + + # source://rbs//lib/rbs/collection/sources/rubygems.rb#11 def new(*_arg0); end end end @@ -1960,7 +3188,10 @@ class RBS::Collection::Sources::Stdlib class << self private + # source://rbs//lib/rbs/collection/sources/stdlib.rb#11 def allocate; end + + # source://rbs//lib/rbs/collection/sources/stdlib.rb#11 def new(*_arg0); end end end @@ -1983,7 +3214,7 @@ class RBS::Constant # source://rbs//lib/rbs/constant.rb#7 def entry; end - # source://rbs//lib/rbs/constant.rb#15 + # source://rbs//lib/rbs/constant.rb#22 def eql?(other); end # source://rbs//lib/rbs/constant.rb#24 @@ -2000,51 +3231,51 @@ class RBS::Constant def type; end end -# source://rbs//lib/rbs/errors.rb#553 +# source://rbs//lib/rbs/errors.rb#598 class RBS::CyclicClassAliasDefinitionError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [CyclicClassAliasDefinitionError] a new instance of CyclicClassAliasDefinitionError # - # source://rbs//lib/rbs/errors.rb#558 + # source://rbs//lib/rbs/errors.rb#603 def initialize(entry); end # Returns the value of attribute alias_entry. # - # source://rbs//lib/rbs/errors.rb#556 + # source://rbs//lib/rbs/errors.rb#601 def alias_entry; end - # source://rbs//lib/rbs/errors.rb#564 + # source://rbs//lib/rbs/errors.rb#609 def location; end end -# source://rbs//lib/rbs/errors.rb#514 +# source://rbs//lib/rbs/errors.rb#559 class RBS::CyclicTypeParameterBound < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [CyclicTypeParameterBound] a new instance of CyclicTypeParameterBound # - # source://rbs//lib/rbs/errors.rb#519 + # source://rbs//lib/rbs/errors.rb#564 def initialize(type_name:, method_name:, params:, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#517 + # source://rbs//lib/rbs/errors.rb#562 def location; end # Returns the value of attribute method_name. # - # source://rbs//lib/rbs/errors.rb#517 + # source://rbs//lib/rbs/errors.rb#562 def method_name; end # Returns the value of attribute params. # - # source://rbs//lib/rbs/errors.rb#517 + # source://rbs//lib/rbs/errors.rb#562 def params; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#517 + # source://rbs//lib/rbs/errors.rb#562 def type_name; end end @@ -2052,336 +3283,346 @@ end class RBS::Definition # @return [Definition] a new instance of Definition # - # source://rbs//lib/rbs/definition.rb#284 + # source://rbs//lib/rbs/definition.rb#302 def initialize(type_name:, entry:, self_type:, ancestors:); end # Returns the value of attribute ancestors. # - # source://rbs//lib/rbs/definition.rb#278 + # source://rbs//lib/rbs/definition.rb#296 def ancestors; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#307 + # source://rbs//lib/rbs/definition.rb#325 def class?; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#324 + # source://rbs//lib/rbs/definition.rb#342 def class_type?; end # Returns the value of attribute class_variables. # - # source://rbs//lib/rbs/definition.rb#282 + # source://rbs//lib/rbs/definition.rb#300 def class_variables; end - # source://rbs//lib/rbs/definition.rb#369 + # source://rbs//lib/rbs/definition.rb#389 def each_type(&block); end # Returns the value of attribute entry. # - # source://rbs//lib/rbs/definition.rb#277 + # source://rbs//lib/rbs/definition.rb#295 def entry; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#328 + # source://rbs//lib/rbs/definition.rb#346 def instance_type?; end # Returns the value of attribute instance_variables. # - # source://rbs//lib/rbs/definition.rb#281 + # source://rbs//lib/rbs/definition.rb#299 def instance_variables; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#315 + # source://rbs//lib/rbs/definition.rb#333 def interface?; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#332 + # source://rbs//lib/rbs/definition.rb#350 def interface_type?; end - # source://rbs//lib/rbs/definition.rb#359 + # source://rbs//lib/rbs/definition.rb#379 def map_method_type(&block); end # Returns the value of attribute methods. # - # source://rbs//lib/rbs/definition.rb#280 + # source://rbs//lib/rbs/definition.rb#298 def methods; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#311 + # source://rbs//lib/rbs/definition.rb#329 def module?; end # Returns the value of attribute self_type. # - # source://rbs//lib/rbs/definition.rb#279 + # source://rbs//lib/rbs/definition.rb#297 def self_type; end - # source://rbs//lib/rbs/definition.rb#349 + # source://rbs//lib/rbs/definition.rb#367 def sub(s); end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/definition.rb#276 + # source://rbs//lib/rbs/definition.rb#294 def type_name; end - # source://rbs//lib/rbs/definition.rb#336 + # source://rbs//lib/rbs/definition.rb#354 def type_params; end - # source://rbs//lib/rbs/definition.rb#340 + # source://rbs//lib/rbs/definition.rb#358 def type_params_decl; end end -# source://rbs//lib/rbs/definition.rb#191 +# source://rbs//lib/rbs/definition.rb#209 module RBS::Definition::Ancestor; end -# source://rbs//lib/rbs/definition.rb#192 +# source://rbs//lib/rbs/definition.rb#210 class RBS::Definition::Ancestor::Instance # @return [Instance] a new instance of Instance # - # source://rbs//lib/rbs/definition.rb#195 + # source://rbs//lib/rbs/definition.rb#213 def initialize(name:, args:, source:); end - # source://rbs//lib/rbs/definition.rb#201 + # source://rbs//lib/rbs/definition.rb#219 def ==(other); end # Returns the value of attribute args. # - # source://rbs//lib/rbs/definition.rb#193 + # source://rbs//lib/rbs/definition.rb#211 def args; end - # source://rbs//lib/rbs/definition.rb#201 + # source://rbs//lib/rbs/definition.rb#223 def eql?(other); end - # source://rbs//lib/rbs/definition.rb#207 + # source://rbs//lib/rbs/definition.rb#225 def hash; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/definition.rb#193 + # source://rbs//lib/rbs/definition.rb#211 def name; end # Returns the value of attribute source. # - # source://rbs//lib/rbs/definition.rb#193 + # source://rbs//lib/rbs/definition.rb#211 def source; end end -# source://rbs//lib/rbs/definition.rb#212 +# source://rbs//lib/rbs/definition.rb#230 class RBS::Definition::Ancestor::Singleton # @return [Singleton] a new instance of Singleton # - # source://rbs//lib/rbs/definition.rb#215 + # source://rbs//lib/rbs/definition.rb#233 def initialize(name:); end - # source://rbs//lib/rbs/definition.rb#219 + # source://rbs//lib/rbs/definition.rb#237 def ==(other); end - # source://rbs//lib/rbs/definition.rb#219 + # source://rbs//lib/rbs/definition.rb#241 def eql?(other); end - # source://rbs//lib/rbs/definition.rb#225 + # source://rbs//lib/rbs/definition.rb#243 def hash; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/definition.rb#213 + # source://rbs//lib/rbs/definition.rb#231 def name; end end -# source://rbs//lib/rbs/definition.rb#231 +# source://rbs//lib/rbs/definition.rb#249 class RBS::Definition::InstanceAncestors # @return [InstanceAncestors] a new instance of InstanceAncestors # - # source://rbs//lib/rbs/definition.rb#236 + # source://rbs//lib/rbs/definition.rb#254 def initialize(type_name:, params:, ancestors:); end # Returns the value of attribute ancestors. # - # source://rbs//lib/rbs/definition.rb#234 + # source://rbs//lib/rbs/definition.rb#252 def ancestors; end - # source://rbs//lib/rbs/definition.rb#242 + # source://rbs//lib/rbs/definition.rb#260 def apply(args, env:, location:); end # Returns the value of attribute params. # - # source://rbs//lib/rbs/definition.rb#233 + # source://rbs//lib/rbs/definition.rb#251 def params; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/definition.rb#232 + # source://rbs//lib/rbs/definition.rb#250 def type_name; end end -# source://rbs//lib/rbs/definition.rb#25 +# source://rbs//lib/rbs/definition.rb#30 class RBS::Definition::Method # @return [Method] a new instance of Method # - # source://rbs//lib/rbs/definition.rb#83 - def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil)); end + # source://rbs//lib/rbs/definition.rb#107 + def initialize(super_method:, defs:, accessibility:, alias_of:, annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end - # source://rbs//lib/rbs/definition.rb#91 + # source://rbs//lib/rbs/definition.rb#117 def ==(other); end # Returns the value of attribute accessibility. # - # source://rbs//lib/rbs/definition.rb#79 + # source://rbs//lib/rbs/definition.rb#101 def accessibility; end + # Returns the value of attribute alias_member. + # + # source://rbs//lib/rbs/definition.rb#105 + def alias_member; end + # Returns the value of attribute alias_of. # - # source://rbs//lib/rbs/definition.rb#81 + # source://rbs//lib/rbs/definition.rb#104 def alias_of; end - # source://rbs//lib/rbs/definition.rb#128 + # Returns the value of attribute annotations. + # + # source://rbs//lib/rbs/definition.rb#103 def annotations; end - # source://rbs//lib/rbs/definition.rb#124 + # source://rbs//lib/rbs/definition.rb#151 def comments; end - # source://rbs//lib/rbs/definition.rb#106 + # source://rbs//lib/rbs/definition.rb#133 def defined_in; end # Returns the value of attribute defs. # - # source://rbs//lib/rbs/definition.rb#78 + # source://rbs//lib/rbs/definition.rb#100 def defs; end - # source://rbs//lib/rbs/definition.rb#91 + # source://rbs//lib/rbs/definition.rb#127 def eql?(other); end # Returns the value of attribute extra_annotations. # - # source://rbs//lib/rbs/definition.rb#80 + # source://rbs//lib/rbs/definition.rb#102 def extra_annotations; end - # source://rbs//lib/rbs/definition.rb#102 + # source://rbs//lib/rbs/definition.rb#129 def hash; end - # source://rbs//lib/rbs/definition.rb#113 + # source://rbs//lib/rbs/definition.rb#140 def implemented_in; end - # source://rbs//lib/rbs/definition.rb#171 + # source://rbs//lib/rbs/definition.rb#190 def map_method_type(&block); end - # source://rbs//lib/rbs/definition.rb#153 + # source://rbs//lib/rbs/definition.rb#176 def map_type(&block); end - # source://rbs//lib/rbs/definition.rb#162 + # source://rbs//lib/rbs/definition.rb#183 def map_type_bound(&block); end - # source://rbs//lib/rbs/definition.rb#132 + # source://rbs//lib/rbs/definition.rb#155 def members; end - # source://rbs//lib/rbs/definition.rb#120 + # source://rbs//lib/rbs/definition.rb#147 def method_types; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#140 + # source://rbs//lib/rbs/definition.rb#163 def private?; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#136 + # source://rbs//lib/rbs/definition.rb#159 def public?; end - # source://rbs//lib/rbs/definition.rb#144 + # source://rbs//lib/rbs/definition.rb#167 def sub(s); end # Returns the value of attribute super_method. # - # source://rbs//lib/rbs/definition.rb#77 + # source://rbs//lib/rbs/definition.rb#99 def super_method; end - # source://rbs//lib/rbs/definition.rb#180 - def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil)); end + # source://rbs//lib/rbs/definition.rb#196 + def update(super_method: T.unsafe(nil), defs: T.unsafe(nil), accessibility: T.unsafe(nil), alias_of: T.unsafe(nil), annotations: T.unsafe(nil), alias_member: T.unsafe(nil)); end end -# source://rbs//lib/rbs/definition.rb#26 +# source://rbs//lib/rbs/definition.rb#31 class RBS::Definition::Method::TypeDef # @return [TypeDef] a new instance of TypeDef # - # source://rbs//lib/rbs/definition.rb#35 + # source://rbs//lib/rbs/definition.rb#40 def initialize(type:, member:, defined_in:, implemented_in:, overload_annotations: T.unsafe(nil)); end - # source://rbs//lib/rbs/definition.rb#45 + # source://rbs//lib/rbs/definition.rb#50 def ==(other); end # Returns the value of attribute annotations. # - # source://rbs//lib/rbs/definition.rb#33 + # source://rbs//lib/rbs/definition.rb#38 def annotations; end - # source://rbs//lib/rbs/definition.rb#59 + # source://rbs//lib/rbs/definition.rb#64 def comment; end # Returns the value of attribute defined_in. # - # source://rbs//lib/rbs/definition.rb#29 + # source://rbs//lib/rbs/definition.rb#34 def defined_in; end - # source://rbs//lib/rbs/definition.rb#45 + # source://rbs//lib/rbs/definition.rb#89 + def each_annotation(&block); end + + # source://rbs//lib/rbs/definition.rb#58 def eql?(other); end - # source://rbs//lib/rbs/definition.rb#55 + # source://rbs//lib/rbs/definition.rb#60 def hash; end # Returns the value of attribute implemented_in. # - # source://rbs//lib/rbs/definition.rb#30 + # source://rbs//lib/rbs/definition.rb#35 def implemented_in; end # Returns the value of attribute member. # - # source://rbs//lib/rbs/definition.rb#28 + # source://rbs//lib/rbs/definition.rb#33 def member; end # Returns the value of attribute member_annotations. # - # source://rbs//lib/rbs/definition.rb#31 + # source://rbs//lib/rbs/definition.rb#36 def member_annotations; end # @return [Boolean] # - # source://rbs//lib/rbs/definition.rb#67 + # source://rbs//lib/rbs/definition.rb#80 def overload?; end # Returns the value of attribute overload_annotations. # - # source://rbs//lib/rbs/definition.rb#32 + # source://rbs//lib/rbs/definition.rb#37 def overload_annotations; end # Returns the value of attribute type. # - # source://rbs//lib/rbs/definition.rb#27 + # source://rbs//lib/rbs/definition.rb#32 def type; end - # source://rbs//lib/rbs/definition.rb#63 + # source://rbs//lib/rbs/definition.rb#73 def update(type: T.unsafe(nil), member: T.unsafe(nil), defined_in: T.unsafe(nil), implemented_in: T.unsafe(nil)); end end -# source://rbs//lib/rbs/definition.rb#266 +# source://rbs//lib/rbs/definition.rb#284 class RBS::Definition::SingletonAncestors # @return [SingletonAncestors] a new instance of SingletonAncestors # - # source://rbs//lib/rbs/definition.rb#270 + # source://rbs//lib/rbs/definition.rb#288 def initialize(type_name:, ancestors:); end # Returns the value of attribute ancestors. # - # source://rbs//lib/rbs/definition.rb#268 + # source://rbs//lib/rbs/definition.rb#286 def ancestors; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/definition.rb#267 + # source://rbs//lib/rbs/definition.rb#285 def type_name; end end @@ -2389,8 +3630,8 @@ end class RBS::Definition::Variable # @return [Variable] a new instance of Variable # - # source://rbs//lib/rbs/definition.rb#10 - def initialize(parent_variable:, type:, declared_in:); end + # source://rbs//lib/rbs/definition.rb#11 + def initialize(parent_variable:, type:, declared_in:, source:); end # Returns the value of attribute declared_in. # @@ -2402,7 +3643,12 @@ class RBS::Definition::Variable # source://rbs//lib/rbs/definition.rb#6 def parent_variable; end - # source://rbs//lib/rbs/definition.rb#16 + # Returns the value of attribute source. + # + # source://rbs//lib/rbs/definition.rb#9 + def source; end + + # source://rbs//lib/rbs/definition.rb#18 def sub(s); end # Returns the value of attribute type. @@ -2423,27 +3669,27 @@ class RBS::DefinitionBuilder # source://rbs//lib/rbs/definition_builder.rb#6 def ancestor_builder; end - # source://rbs//lib/rbs/definition_builder.rb#168 + # source://rbs//lib/rbs/definition_builder.rb#195 def build_instance(type_name); end # source://rbs//lib/rbs/definition_builder.rb#43 def build_interface(type_name); end - # source://rbs//lib/rbs/definition_builder.rb#301 + # source://rbs//lib/rbs/definition_builder.rb#327 def build_singleton(type_name); end # Builds a definition for singleton without .new method. # - # source://rbs//lib/rbs/definition_builder.rb#230 + # source://rbs//lib/rbs/definition_builder.rb#257 def build_singleton0(type_name); end # source://rbs//lib/rbs/definition_builder.rb#85 - def define_instance(definition, type_name, subst); end + def define_instance(definition, type_name, subst, define_class_vars:); end # source://rbs//lib/rbs/definition_builder.rb#33 def define_interface(definition, type_name, subst); end - # source://rbs//lib/rbs/definition_builder.rb#607 + # source://rbs//lib/rbs/definition_builder.rb#695 def define_method(methods, definition, method, subst, self_type_methods, defined_in:, implemented_in: T.unsafe(nil)); end # source://rbs//lib/rbs/definition_builder.rb#25 @@ -2454,20 +3700,20 @@ class RBS::DefinitionBuilder # source://rbs//lib/rbs/definition_builder.rb#5 def env; end - # source://rbs//lib/rbs/definition_builder.rb#770 + # source://rbs//lib/rbs/definition_builder.rb#983 def expand_alias(type_name); end - # source://rbs//lib/rbs/definition_builder.rb#774 + # source://rbs//lib/rbs/definition_builder.rb#987 def expand_alias1(type_name); end - # source://rbs//lib/rbs/definition_builder.rb#781 + # source://rbs//lib/rbs/definition_builder.rb#994 def expand_alias2(type_name, args); end - # source://rbs//lib/rbs/definition_builder.rb#546 + # source://rbs//lib/rbs/definition_builder.rb#634 def import_methods(definition, module_name, module_methods, interfaces_methods, subst, self_type_methods); end - # source://rbs//lib/rbs/definition_builder.rb#538 - def insert_variable(type_name, variables, name:, type:); end + # source://rbs//lib/rbs/definition_builder.rb#583 + def insert_variable(type_name, variables, name:, type:, source:); end # Returns the value of attribute instance_cache. # @@ -2479,7 +3725,7 @@ class RBS::DefinitionBuilder # source://rbs//lib/rbs/definition_builder.rb#12 def interface_cache; end - # source://rbs//lib/rbs/definition_builder.rb#412 + # source://rbs//lib/rbs/definition_builder.rb#453 def interface_methods(interface_ancestors); end # Returns the value of attribute method_builder. @@ -2497,31 +3743,37 @@ class RBS::DefinitionBuilder # source://rbs//lib/rbs/definition_builder.rb#10 def singleton_cache; end - # source://rbs//lib/rbs/definition_builder.rb#442 + # source://rbs//lib/rbs/definition_builder.rb#483 def source_location(source, decl); end + # source://rbs//lib/rbs/definition_builder.rb#973 + def special_accessibility(is_instance, method_name); end + # source://rbs//lib/rbs/definition_builder.rb#66 def tapp_subst(name, args); end - # source://rbs//lib/rbs/definition_builder.rb#766 + # source://rbs//lib/rbs/definition_builder.rb#979 def try_cache(type_name, cache:); end - # source://rbs//lib/rbs/definition_builder.rb#805 + # source://rbs//lib/rbs/definition_builder.rb#1018 def update(env:, except:, ancestor_builder:); end - # source://rbs//lib/rbs/definition_builder.rb#432 + # source://rbs//lib/rbs/definition_builder.rb#473 def validate_params_with(type_params, result:); end # @raise [NoTypeFoundError] # - # source://rbs//lib/rbs/definition_builder.rb#834 + # source://rbs//lib/rbs/definition_builder.rb#1047 def validate_type_name(name, location); end - # source://rbs//lib/rbs/definition_builder.rb#456 + # source://rbs//lib/rbs/definition_builder.rb#501 def validate_type_params(definition, ancestors:, methods:); end - # source://rbs//lib/rbs/definition_builder.rb#823 + # source://rbs//lib/rbs/definition_builder.rb#1036 def validate_type_presence(type); end + + # source://rbs//lib/rbs/definition_builder.rb#594 + def validate_variable(var); end end # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#5 @@ -2536,10 +3788,10 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#151 def env; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#606 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#664 def fill_ancestor_source(ancestor, name:, source:, &block); end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#434 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#492 def instance_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # Returns the value of attribute instance_ancestors_cache. @@ -2547,7 +3799,7 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#154 def instance_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#570 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#628 def interface_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # Returns the value of attribute interface_ancestors_cache. @@ -2555,10 +3807,10 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#160 def interface_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#414 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#474 def mixin_ancestors(entry, type_name, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#348 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#350 def mixin_ancestors0(decl, type_name, align_params:, included_modules:, included_interfaces:, extended_modules:, prepended_modules:, extended_interfaces:); end # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#192 @@ -2569,7 +3821,7 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#153 def one_instance_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#329 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#331 def one_interface_ancestors(type_name); end # Returns the value of attribute one_interface_ancestors_cache. @@ -2577,7 +3829,7 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#159 def one_interface_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#275 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#277 def one_singleton_ancestors(type_name); end # Returns the value of attribute one_singleton_ancestors_cache. @@ -2585,7 +3837,7 @@ class RBS::DefinitionBuilder::AncestorBuilder # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#156 def one_singleton_ancestors_cache; end - # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#515 + # source://rbs//lib/rbs/definition_builder/ancestor_builder.rb#573 def singleton_ancestors(type_name, building_ancestors: T.unsafe(nil)); end # Returns the value of attribute singleton_ancestors_cache. @@ -2694,26 +3946,29 @@ class RBS::DefinitionBuilder::MethodBuilder # source://rbs//lib/rbs/definition_builder/method_builder.rb#91 def initialize(env:); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#194 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#211 def build_alias(methods, type, member:); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#199 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#216 def build_attribute(methods, type, member:, accessibility:); end # source://rbs//lib/rbs/definition_builder/method_builder.rb#99 def build_instance(type_name); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#174 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#191 def build_interface(type_name); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#215 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#250 def build_method(methods, type, member:, accessibility:); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#145 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#232 + def build_ruby_attribute(methods, type, member:, accessibility:); end + + # source://rbs//lib/rbs/definition_builder/method_builder.rb#162 def build_singleton(type_name); end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#226 - def each_member_with_accessibility(members, accessibility: T.unsafe(nil)); end + # source://rbs//lib/rbs/definition_builder/method_builder.rb#261 + def each_rbs_member_with_accessibility(members, accessibility: T.unsafe(nil)); end # Returns the value of attribute env. # @@ -2735,7 +3990,7 @@ class RBS::DefinitionBuilder::MethodBuilder # source://rbs//lib/rbs/definition_builder/method_builder.rb#88 def singleton_methods; end - # source://rbs//lib/rbs/definition_builder/method_builder.rb#239 + # source://rbs//lib/rbs/definition_builder/method_builder.rb#274 def update(env:, except:); end end @@ -2828,7 +4083,7 @@ class RBS::Diff # source://rbs//lib/rbs/diff.rb#49 def build_methods(path); end - # source://rbs//lib/rbs/diff.rb#116 + # source://rbs//lib/rbs/diff.rb#122 def constant_to_s(constant); end # source://rbs//lib/rbs/diff.rb#100 @@ -2841,21 +4096,21 @@ class RBS::Diff def each_diff_methods(kind, before_methods, after_methods); end end -# source://rbs//lib/rbs/errors.rb#394 +# source://rbs//lib/rbs/errors.rb#419 class RBS::DuplicatedDeclarationError < ::RBS::LoadingError # @return [DuplicatedDeclarationError] a new instance of DuplicatedDeclarationError # - # source://rbs//lib/rbs/errors.rb#398 + # source://rbs//lib/rbs/errors.rb#423 def initialize(name, *decls); end # Returns the value of attribute decls. # - # source://rbs//lib/rbs/errors.rb#396 + # source://rbs//lib/rbs/errors.rb#421 def decls; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/errors.rb#395 + # source://rbs//lib/rbs/errors.rb#420 def name; end end @@ -2934,327 +4189,340 @@ end class RBS::Environment # @return [Environment] a new instance of Environment # - # source://rbs//lib/rbs/environment.rb#145 + # source://rbs//lib/rbs/environment.rb#48 def initialize; end - # source://rbs//lib/rbs/environment.rb#470 - def <<(decl); end - - # source://rbs//lib/rbs/environment.rb#792 + # source://rbs//lib/rbs/environment.rb#981 def absolute_type(resolver, map, type, context:); end - # source://rbs//lib/rbs/environment.rb#787 + # source://rbs//lib/rbs/environment.rb#976 def absolute_type_name(resolver, map, type_name, context:); end - # source://rbs//lib/rbs/environment.rb#476 - def add_signature(buffer:, directives:, decls:); end + # source://rbs//lib/rbs/environment.rb#455 + def add_source(source); end - # source://rbs//lib/rbs/environment.rb#528 + # source://rbs//lib/rbs/environment.rb#568 def append_context(context, decl); end - # source://rbs//lib/rbs/environment.rb#803 + # source://rbs//lib/rbs/environment.rb#992 def buffers; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#218 + # source://rbs//lib/rbs/environment.rb#117 def class_alias?(name); end # Returns the value of attribute class_alias_decls. # - # source://rbs//lib/rbs/environment.rb#12 + # source://rbs//lib/rbs/environment.rb#10 def class_alias_decls; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#202 + # source://rbs//lib/rbs/environment.rb#101 def class_decl?(name); end # Returns the value of attribute class_decls. # - # source://rbs//lib/rbs/environment.rb#7 + # source://rbs//lib/rbs/environment.rb#5 def class_decls; end - # source://rbs//lib/rbs/environment.rb#226 - def class_entry(type_name); end + # source://rbs//lib/rbs/environment.rb#125 + def class_entry(type_name, normalized: T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#198 + # source://rbs//lib/rbs/environment.rb#97 def constant_decl?(name); end # Returns the value of attribute constant_decls. # - # source://rbs//lib/rbs/environment.rb#10 + # source://rbs//lib/rbs/environment.rb#8 def constant_decls; end - # source://rbs//lib/rbs/environment.rb#274 - def constant_entry(type_name); end + # source://rbs//lib/rbs/environment.rb#167 + def constant_entry(type_name, normalized: T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#194 + # source://rbs//lib/rbs/environment.rb#93 def constant_name?(name); end - # Returns the value of attribute declarations. - # - # source://rbs//lib/rbs/environment.rb#5 + # source://rbs//lib/rbs/environment.rb#14 def declarations; end + # source://rbs//lib/rbs/environment.rb#470 + def each_rbs_source(&block); end + + # source://rbs//lib/rbs/environment.rb#482 + def each_ruby_source(&block); end + # Returns the value of attribute global_decls. # - # source://rbs//lib/rbs/environment.rb#11 + # source://rbs//lib/rbs/environment.rb#9 def global_decls; end - # source://rbs//lib/rbs/environment.rb#373 - def insert_decl(decl, outer:, namespace:); end + # source://rbs//lib/rbs/environment.rb#277 + def insert_rbs_decl(decl, context:, namespace:); end - # source://rbs//lib/rbs/environment.rb#798 + # source://rbs//lib/rbs/environment.rb#374 + def insert_ruby_decl(decl, context:, namespace:); end + + # source://rbs//lib/rbs/environment.rb#987 def inspect; end # Returns the value of attribute interface_decls. # - # source://rbs//lib/rbs/environment.rb#8 + # source://rbs//lib/rbs/environment.rb#6 def interface_decls; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#176 + # source://rbs//lib/rbs/environment.rb#75 def interface_name?(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#210 + # source://rbs//lib/rbs/environment.rb#109 def module_alias?(name); end - # source://rbs//lib/rbs/environment.rb#266 - def module_class_entry(type_name); end + # source://rbs//lib/rbs/environment.rb#154 + def module_class_entry(type_name, normalized: T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#206 + # source://rbs//lib/rbs/environment.rb#105 def module_decl?(name); end - # source://rbs//lib/rbs/environment.rb#235 - def module_entry(type_name); end + # source://rbs//lib/rbs/environment.rb#132 + def module_entry(type_name, normalized: T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#184 + # source://rbs//lib/rbs/environment.rb#83 def module_name?(name); end - # source://rbs//lib/rbs/environment.rb#332 + # source://rbs//lib/rbs/environment.rb#269 def normalize_module_name(name); end + # source://rbs//lib/rbs/environment.rb#273 + def normalize_module_name!(name); end + # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#336 + # source://rbs//lib/rbs/environment.rb#241 def normalize_module_name?(name); end - # source://rbs//lib/rbs/environment.rb#328 + # source://rbs//lib/rbs/environment.rb#219 def normalize_type_name(name); end - # source://rbs//lib/rbs/environment.rb#297 + # source://rbs//lib/rbs/environment.rb#206 def normalize_type_name!(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#278 + # source://rbs//lib/rbs/environment.rb#187 def normalize_type_name?(name); end - # source://rbs//lib/rbs/environment.rb#244 + # source://rbs//lib/rbs/environment.rb#139 def normalized_class_entry(type_name); end - # source://rbs//lib/rbs/environment.rb#270 + # source://rbs//lib/rbs/environment.rb#163 def normalized_module_class_entry(type_name); end - # source://rbs//lib/rbs/environment.rb#255 + # source://rbs//lib/rbs/environment.rb#150 def normalized_module_entry(type_name); end - # source://rbs//lib/rbs/environment.rb#323 + # source://rbs//lib/rbs/environment.rb#236 def normalized_type_name!(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#310 + # source://rbs//lib/rbs/environment.rb#223 def normalized_type_name?(type_name); end - # source://rbs//lib/rbs/environment.rb#537 - def resolve_declaration(resolver, map, decl, outer:, prefix:); end + # source://rbs//lib/rbs/environment.rb#577 + def resolve_declaration(resolver, map, decl, context:, prefix:); end - # source://rbs//lib/rbs/environment.rb#673 + # source://rbs//lib/rbs/environment.rb#862 def resolve_member(resolver, map, member, context:); end - # source://rbs//lib/rbs/environment.rb#773 + # source://rbs//lib/rbs/environment.rb#962 def resolve_method_type(resolver, map, type, context:); end - # source://rbs//lib/rbs/environment.rb#489 + # source://rbs//lib/rbs/environment.rb#713 + def resolve_ruby_decl(resolver, decl, context:, prefix:); end + + # source://rbs//lib/rbs/environment.rb#790 + def resolve_ruby_member(resolver, member, context:); end + + # source://rbs//lib/rbs/environment.rb#500 + def resolve_signature(resolver, table, dirs, decls, only: T.unsafe(nil)); end + + # source://rbs//lib/rbs/environment.rb#522 def resolve_type_names(only: T.unsafe(nil)); end - # source://rbs//lib/rbs/environment.rb#781 + # source://rbs//lib/rbs/environment.rb#970 def resolve_type_params(resolver, map, params, context:); end - # source://rbs//lib/rbs/environment.rb#522 + # source://rbs//lib/rbs/environment.rb#562 def resolver_context(*nesting); end - # Returns the value of attribute signatures. + # Returns the value of attribute sources. # - # source://rbs//lib/rbs/environment.rb#14 - def signatures; end + # source://rbs//lib/rbs/environment.rb#12 + def sources; end # Returns the value of attribute type_alias_decls. # - # source://rbs//lib/rbs/environment.rb#9 + # source://rbs//lib/rbs/environment.rb#7 def type_alias_decls; end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#180 + # source://rbs//lib/rbs/environment.rb#79 def type_alias_name?(name); end # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#188 + # source://rbs//lib/rbs/environment.rb#87 def type_name?(name); end - # source://rbs//lib/rbs/environment.rb#807 - def unload(buffers); end + # source://rbs//lib/rbs/environment.rb#996 + def unload(paths); end - # source://rbs//lib/rbs/environment.rb#483 + # source://rbs//lib/rbs/environment.rb#494 def validate_type_params; end private - # source://rbs//lib/rbs/environment.rb#158 + # source://rbs//lib/rbs/environment.rb#59 def initialize_copy(other); end class << self - # source://rbs//lib/rbs/environment.rb#170 + # source://rbs//lib/rbs/environment.rb#69 def from_loader(loader); end end end -# source://rbs//lib/rbs/environment.rb#130 +# source://rbs//lib/rbs/environment.rb#33 class RBS::Environment::ClassAliasEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#100 -class RBS::Environment::ClassEntry < ::RBS::Environment::MultiEntry - # source://rbs//lib/rbs/environment.rb#101 - def primary; end -end +# source://rbs//lib/rbs/environment/class_entry.rb#5 +class RBS::Environment::ClassEntry + # @return [ClassEntry] a new instance of ClassEntry + # + # source://rbs//lib/rbs/environment/class_entry.rb#10 + def initialize(name); end -# source://rbs//lib/rbs/environment.rb#139 -class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + # source://rbs//lib/rbs/environment/class_entry.rb#15 + def <<(context_decl); end + + # Returns the value of attribute context_decls. + # + # source://rbs//lib/rbs/environment/class_entry.rb#8 + def context_decls; end + + # source://rbs//lib/rbs/environment/class_entry.rb#21 + def each_decl(&block); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/environment/class_entry.rb#31 + def empty?; end + + # Returns the value of attribute name. + # + # source://rbs//lib/rbs/environment/class_entry.rb#6 + def name; end + + # source://rbs//lib/rbs/environment/class_entry.rb#35 + def primary_decl; end -# source://rbs//lib/rbs/environment.rb#16 -module RBS::Environment::ContextUtil - # source://rbs//lib/rbs/environment.rb#17 - def calculate_context(decls); end + # source://rbs//lib/rbs/environment/class_entry.rb#47 + def type_params; end + + # source://rbs//lib/rbs/environment/class_entry.rb#52 + def validate_type_params; end end -# source://rbs//lib/rbs/environment.rb#142 +# source://rbs//lib/rbs/environment.rb#42 +class RBS::Environment::ConstantEntry < ::RBS::Environment::SingleEntry; end + +# source://rbs//lib/rbs/environment.rb#45 class RBS::Environment::GlobalEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#133 +# source://rbs//lib/rbs/environment.rb#36 class RBS::Environment::InterfaceEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#127 +# source://rbs//lib/rbs/environment.rb#30 class RBS::Environment::ModuleAliasEntry < ::RBS::Environment::SingleEntry; end -# source://rbs//lib/rbs/environment.rb#85 -class RBS::Environment::ModuleEntry < ::RBS::Environment::MultiEntry - # source://rbs//lib/rbs/environment.rb#92 - def primary; end +# source://rbs//lib/rbs/environment/module_entry.rb#5 +class RBS::Environment::ModuleEntry + # @return [ModuleEntry] a new instance of ModuleEntry + # + # source://rbs//lib/rbs/environment/module_entry.rb#10 + def initialize(name); end - # source://rbs//lib/rbs/environment.rb#86 - def self_types; end -end + # source://rbs//lib/rbs/environment/module_entry.rb#15 + def <<(context_decl); end -# source://rbs//lib/rbs/environment.rb#29 -class RBS::Environment::MultiEntry - # @return [MultiEntry] a new instance of MultiEntry + # Returns the value of attribute context_decls. # - # source://rbs//lib/rbs/environment.rb#43 - def initialize(name:); end + # source://rbs//lib/rbs/environment/module_entry.rb#8 + def context_decls; end - # @return [Boolean] - # - # source://rbs//lib/rbs/environment.rb#70 - def compatible_params?(ps1, ps2); end + # source://rbs//lib/rbs/environment/module_entry.rb#20 + def each_decl(&block); end - # Returns the value of attribute decls. + # @return [Boolean] # - # source://rbs//lib/rbs/environment.rb#41 - def decls; end - - # source://rbs//lib/rbs/environment.rb#48 - def insert(decl:, outer:); end + # source://rbs//lib/rbs/environment/module_entry.rb#30 + def empty?; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/environment.rb#40 + # source://rbs//lib/rbs/environment/module_entry.rb#6 def name; end - # source://rbs//lib/rbs/environment.rb#80 - def primary; end + # source://rbs//lib/rbs/environment/module_entry.rb#34 + def primary_decl; end + + # source://rbs//lib/rbs/environment/module_entry.rb#43 + def self_types; end - # source://rbs//lib/rbs/environment.rb#76 + # source://rbs//lib/rbs/environment/module_entry.rb#38 def type_params; end - # source://rbs//lib/rbs/environment.rb#53 + # source://rbs//lib/rbs/environment/module_entry.rb#49 def validate_type_params; end end -# source://rbs//lib/rbs/environment.rb#30 -class RBS::Environment::MultiEntry::D < ::Struct - include ::RBS::Environment::ContextUtil - - # source://rbs//lib/rbs/environment.rb#35 - def context; end - - def decl; end - def decl=(_); end - def outer; end - def outer=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://rbs//lib/rbs/environment.rb#109 +# source://rbs//lib/rbs/environment.rb#18 class RBS::Environment::SingleEntry - include ::RBS::Environment::ContextUtil - # @return [SingleEntry] a new instance of SingleEntry # - # source://rbs//lib/rbs/environment.rb#114 - def initialize(name:, decl:, outer:); end + # source://rbs//lib/rbs/environment.rb#23 + def initialize(name:, decl:, context:); end - # source://rbs//lib/rbs/environment.rb#122 + # Returns the value of attribute context. + # + # source://rbs//lib/rbs/environment.rb#20 def context; end # Returns the value of attribute decl. # - # source://rbs//lib/rbs/environment.rb#112 + # source://rbs//lib/rbs/environment.rb#21 def decl; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/environment.rb#110 + # source://rbs//lib/rbs/environment.rb#19 def name; end - - # Returns the value of attribute outer. - # - # source://rbs//lib/rbs/environment.rb#111 - def outer; end end -# source://rbs//lib/rbs/environment.rb#136 +# source://rbs//lib/rbs/environment.rb#39 class RBS::Environment::TypeAliasEntry < ::RBS::Environment::SingleEntry; end # source://rbs//lib/rbs/environment/use_map.rb#5 @@ -3314,7 +4582,7 @@ class RBS::EnvironmentLoader # source://rbs//lib/rbs/environment_loader.rb#48 def add(path: T.unsafe(nil), library: T.unsafe(nil), version: T.unsafe(nil), resolve_dependencies: T.unsafe(nil)); end - # source://rbs//lib/rbs/environment_loader.rb#80 + # source://rbs//lib/rbs/environment_loader.rb#74 def add_collection(lockfile); end # Returns the value of attribute core_root. @@ -3327,15 +4595,15 @@ class RBS::EnvironmentLoader # source://rbs//lib/rbs/environment_loader.rb#24 def dirs; end - # source://rbs//lib/rbs/environment_loader.rb#131 + # source://rbs//lib/rbs/environment_loader.rb#125 def each_dir; end - # source://rbs//lib/rbs/environment_loader.rb#154 + # source://rbs//lib/rbs/environment_loader.rb#148 def each_signature; end # @return [Boolean] # - # source://rbs//lib/rbs/environment_loader.rb#104 + # source://rbs//lib/rbs/environment_loader.rb#98 def has_library?(library:, version:); end # Returns the value of attribute libs. @@ -3343,7 +4611,7 @@ class RBS::EnvironmentLoader # source://rbs//lib/rbs/environment_loader.rb#23 def libs; end - # source://rbs//lib/rbs/environment_loader.rb#112 + # source://rbs//lib/rbs/environment_loader.rb#106 def load(env:); end # Returns the value of attribute repository. @@ -3351,7 +4619,7 @@ class RBS::EnvironmentLoader # source://rbs//lib/rbs/environment_loader.rb#21 def repository; end - # source://rbs//lib/rbs/environment_loader.rb#65 + # source://rbs//lib/rbs/environment_loader.rb#59 def resolve_dependencies(library:, version:); end class << self @@ -3419,42 +4687,78 @@ end # source://rbs//lib/rbs/environment_walker.rb#5 class RBS::EnvironmentWalker::InstanceNode < ::Struct + # source://rbs//lib/rbs/environment_walker.rb#5 def type_name; end + + # source://rbs//lib/rbs/environment_walker.rb#5 def type_name=(_); end class << self + # source://rbs//lib/rbs/environment_walker.rb#5 def [](*_arg0); end + + # source://rbs//lib/rbs/environment_walker.rb#5 def inspect; end + + # source://rbs//lib/rbs/environment_walker.rb#5 def keyword_init?; end + + # source://rbs//lib/rbs/environment_walker.rb#5 def members; end + + # source://rbs//lib/rbs/environment_walker.rb#5 def new(*_arg0); end end end # source://rbs//lib/rbs/environment_walker.rb#6 class RBS::EnvironmentWalker::SingletonNode < ::Struct + # source://rbs//lib/rbs/environment_walker.rb#6 def type_name; end + + # source://rbs//lib/rbs/environment_walker.rb#6 def type_name=(_); end class << self + # source://rbs//lib/rbs/environment_walker.rb#6 def [](*_arg0); end + + # source://rbs//lib/rbs/environment_walker.rb#6 def inspect; end + + # source://rbs//lib/rbs/environment_walker.rb#6 def keyword_init?; end + + # source://rbs//lib/rbs/environment_walker.rb#6 def members; end + + # source://rbs//lib/rbs/environment_walker.rb#6 def new(*_arg0); end end end # source://rbs//lib/rbs/environment_walker.rb#7 class RBS::EnvironmentWalker::TypeNameNode < ::Struct + # source://rbs//lib/rbs/environment_walker.rb#7 def type_name; end + + # source://rbs//lib/rbs/environment_walker.rb#7 def type_name=(_); end class << self + # source://rbs//lib/rbs/environment_walker.rb#7 def [](*_arg0); end + + # source://rbs//lib/rbs/environment_walker.rb#7 def inspect; end + + # source://rbs//lib/rbs/environment_walker.rb#7 def keyword_init?; end + + # source://rbs//lib/rbs/environment_walker.rb#7 def members; end + + # source://rbs//lib/rbs/environment_walker.rb#7 def new(*_arg0); end end end @@ -3473,39 +4777,39 @@ module RBS::FileFinder end end -# source://rbs//lib/rbs/errors.rb#383 +# source://rbs//lib/rbs/errors.rb#407 class RBS::GenericParameterMismatchError < ::RBS::LoadingError # @return [GenericParameterMismatchError] a new instance of GenericParameterMismatchError # - # source://rbs//lib/rbs/errors.rb#387 - def initialize(name:, decl:); end + # source://rbs//lib/rbs/errors.rb#411 + def initialize(name:, decl:, location: T.unsafe(nil)); end # Returns the value of attribute decl. # - # source://rbs//lib/rbs/errors.rb#385 + # source://rbs//lib/rbs/errors.rb#409 def decl; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/errors.rb#384 + # source://rbs//lib/rbs/errors.rb#408 def name; end end -# source://rbs//lib/rbs/errors.rb#529 +# source://rbs//lib/rbs/errors.rb#574 class RBS::InconsistentClassModuleAliasError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [InconsistentClassModuleAliasError] a new instance of InconsistentClassModuleAliasError # - # source://rbs//lib/rbs/errors.rb#534 + # source://rbs//lib/rbs/errors.rb#579 def initialize(entry); end # Returns the value of attribute alias_entry. # - # source://rbs//lib/rbs/errors.rb#532 + # source://rbs//lib/rbs/errors.rb#577 def alias_entry; end - # source://rbs//lib/rbs/errors.rb#548 + # source://rbs//lib/rbs/errors.rb#593 def location; end end @@ -3532,36 +4836,298 @@ class RBS::InheritModuleError < ::RBS::DefinitionError end end -# source://rbs//lib/rbs/errors.rb#354 +# source://rbs//lib/rbs/inline_parser.rb#4 +class RBS::InlineParser + class << self + # source://rbs//lib/rbs/inline_parser.rb#45 + def parse(buffer, prism); end + end +end + +# source://rbs//lib/rbs/inline_parser/comment_association.rb#5 +class RBS::InlineParser::CommentAssociation + # @return [CommentAssociation] a new instance of CommentAssociation + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#8 + def initialize(blocks); end + + # Returns the value of attribute associated_blocks. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def associated_blocks; end + + # Returns the value of attribute blocks. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def blocks; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#84 + def each_enclosed_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#104 + def each_unassociated_block; end + + # Returns the value of attribute end_line_map. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def end_line_map; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#47 + def leading_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#55 + def leading_block!(node); end + + # Returns the value of attribute start_line_map. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#6 + def start_line_map; end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#63 + def trailing_block(node); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#76 + def trailing_block!(node); end + + class << self + # source://rbs//lib/rbs/inline_parser/comment_association.rb#24 + def build(buffer, result); end + end +end + +# source://rbs//lib/rbs/inline_parser/comment_association.rb#29 +class RBS::InlineParser::CommentAssociation::Reference + # @return [Reference] a new instance of Reference + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#32 + def initialize(block, association); end + + # source://rbs//lib/rbs/inline_parser/comment_association.rb#37 + def associate!; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#42 + def associated?; end + + # Returns the value of attribute block. + # + # source://rbs//lib/rbs/inline_parser/comment_association.rb#30 + def block; end +end + +# source://rbs//lib/rbs/inline_parser.rb#20 +module RBS::InlineParser::Diagnostic; end + +# source://rbs//lib/rbs/inline_parser.rb#38 +class RBS::InlineParser::Diagnostic::AnnotationSyntaxError < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#41 +class RBS::InlineParser::Diagnostic::AttributeNonSymbolName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#21 +class RBS::InlineParser::Diagnostic::Base + # @return [Base] a new instance of Base + # + # source://rbs//lib/rbs/inline_parser.rb#24 + def initialize(location, message); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/inline_parser.rb#22 + def location; end + + # Returns the value of attribute message. + # + # source://rbs//lib/rbs/inline_parser.rb#22 + def message; end +end + +# source://rbs//lib/rbs/inline_parser.rb#42 +class RBS::InlineParser::Diagnostic::ClassModuleAliasDeclarationMissingTypeName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#39 +class RBS::InlineParser::Diagnostic::MixinMultipleArguments < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#40 +class RBS::InlineParser::Diagnostic::MixinNonConstantModule < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#31 +class RBS::InlineParser::Diagnostic::NonConstantClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#36 +class RBS::InlineParser::Diagnostic::NonConstantConstantDeclaration < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#32 +class RBS::InlineParser::Diagnostic::NonConstantModuleName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#33 +class RBS::InlineParser::Diagnostic::NonConstantSuperClassName < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#30 +class RBS::InlineParser::Diagnostic::NotImplementedYet < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#35 +class RBS::InlineParser::Diagnostic::TopLevelAttributeDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#34 +class RBS::InlineParser::Diagnostic::TopLevelMethodDefinition < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#37 +class RBS::InlineParser::Diagnostic::UnusedInlineAnnotation < ::RBS::InlineParser::Diagnostic::Base; end + +# source://rbs//lib/rbs/inline_parser.rb#57 +class RBS::InlineParser::Parser < ::Prism::Visitor + include ::RBS::AST::Ruby::Helpers::ConstantHelper + include ::RBS::AST::Ruby::Helpers::LocationHelper + + # @return [Parser] a new instance of Parser + # + # source://rbs//lib/rbs/inline_parser.rb#63 + def initialize(result); end + + # source://rbs//lib/rbs/inline_parser.rb#69 + def buffer; end + + # Returns the value of attribute comments. + # + # source://rbs//lib/rbs/inline_parser.rb#58 + def comments; end + + # source://rbs//lib/rbs/inline_parser.rb#73 + def current_module; end + + # source://rbs//lib/rbs/inline_parser.rb#77 + def current_module!; end + + # source://rbs//lib/rbs/inline_parser.rb#81 + def diagnostics; end + + # source://rbs//lib/rbs/inline_parser.rb#472 + def insert_declaration(decl); end + + # Returns the value of attribute module_nesting. + # + # source://rbs//lib/rbs/inline_parser.rb#58 + def module_nesting; end + + # source://rbs//lib/rbs/inline_parser.rb#315 + def parse_attribute_call(node); end + + # source://rbs//lib/rbs/inline_parser.rb#375 + def parse_constant_declaration(node); end + + # source://rbs//lib/rbs/inline_parser.rb#259 + def parse_mixin_call(node); end + + # source://rbs//lib/rbs/inline_parser.rb#508 + def parse_super_class(super_class_expr, inheritance_operator_loc); end + + # source://rbs//lib/rbs/inline_parser.rb#85 + def push_module_nesting(mod); end + + # source://rbs//lib/rbs/inline_parser.rb#480 + def report_unused_annotation(*annotations); end + + # source://rbs//lib/rbs/inline_parser.rb#495 + def report_unused_block(block); end + + # Returns the value of attribute result. + # + # source://rbs//lib/rbs/inline_parser.rb#58 + def result; end + + # @return [Boolean] + # + # source://rbs//lib/rbs/inline_parser.rb#92 + def skip_node?(node); end + + # source://rbs//lib/rbs/inline_parser.rb#217 + def visit_call_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#103 + def visit_class_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#253 + def visit_constant_path_write_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#246 + def visit_constant_write_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#178 + def visit_def_node(node); end + + # source://rbs//lib/rbs/inline_parser.rb#156 + def visit_module_node(node); end +end + +# source://rbs//lib/rbs/inline_parser.rb#5 +class RBS::InlineParser::Result + # @return [Result] a new instance of Result + # + # source://rbs//lib/rbs/inline_parser.rb#8 + def initialize(buffer, prism); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def declarations; end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def diagnostics; end + + # Returns the value of attribute prism_result. + # + # source://rbs//lib/rbs/inline_parser.rb#6 + def prism_result; end + + # source://rbs//lib/rbs/inline_parser.rb#15 + def type_fingerprint; end +end + +# source://rbs//lib/rbs/errors.rb#341 +class RBS::InstanceVariableDuplicationError < ::RBS::VariableDuplicationError + # source://rbs//lib/rbs/errors.rb#342 + def kind; end +end + +# source://rbs//lib/rbs/errors.rb#378 class RBS::InvalidOverloadMethodError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [InvalidOverloadMethodError] a new instance of InvalidOverloadMethodError # - # source://rbs//lib/rbs/errors.rb#362 + # source://rbs//lib/rbs/errors.rb#386 def initialize(type_name:, method_name:, kind:, members:); end # Returns the value of attribute kind. # - # source://rbs//lib/rbs/errors.rb#359 + # source://rbs//lib/rbs/errors.rb#383 def kind; end - # source://rbs//lib/rbs/errors.rb#378 + # source://rbs//lib/rbs/errors.rb#402 def location; end # Returns the value of attribute members. # - # source://rbs//lib/rbs/errors.rb#360 + # source://rbs//lib/rbs/errors.rb#384 def members; end # Returns the value of attribute method_name. # - # source://rbs//lib/rbs/errors.rb#358 + # source://rbs//lib/rbs/errors.rb#382 def method_name; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#357 + # source://rbs//lib/rbs/errors.rb#381 def type_name; end end @@ -3606,28 +5172,28 @@ class RBS::InvalidTypeApplicationError < ::RBS::DefinitionError end end -# source://rbs//lib/rbs/errors.rb#407 +# source://rbs//lib/rbs/errors.rb#432 class RBS::InvalidVarianceAnnotationError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [InvalidVarianceAnnotationError] a new instance of InvalidVarianceAnnotationError # - # source://rbs//lib/rbs/errors.rb#414 + # source://rbs//lib/rbs/errors.rb#439 def initialize(type_name:, param:, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#412 + # source://rbs//lib/rbs/errors.rb#437 def location; end # Returns the value of attribute param. # - # source://rbs//lib/rbs/errors.rb#411 + # source://rbs//lib/rbs/errors.rb#436 def param; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#410 + # source://rbs//lib/rbs/errors.rb#435 def type_name; end end @@ -3638,40 +5204,45 @@ class RBS::LoadingError < ::RBS::BaseError; end class RBS::Location def initialize(_arg0, _arg1, _arg2); end - # source://rbs//lib/rbs/location_aux.rb#71 + # source://rbs//lib/rbs/location_aux.rb#79 def ==(other); end def [](_arg0); end def _add_optional_child(_arg0, _arg1, _arg2); end def _add_optional_no_child(_arg0); end def _add_required_child(_arg0, _arg1, _arg2); end + def _end_pos; end def _optional_keys; end def _required_keys; end + def _start_pos; end - # source://rbs//lib/rbs/location_aux.rb#102 + # source://rbs//lib/rbs/location_aux.rb#110 def add_optional_child(name, range); end - # source://rbs//lib/rbs/location_aux.rb#98 + # source://rbs//lib/rbs/location_aux.rb#106 def add_required_child(name, range); end + # source://rbs//lib/rbs/location_aux.rb#27 def aref(_arg0); end + def buffer; end - # source://rbs//lib/rbs/location_aux.rb#110 + # source://rbs//lib/rbs/location_aux.rb#118 def each_optional_key(&block); end - # source://rbs//lib/rbs/location_aux.rb#118 + # source://rbs//lib/rbs/location_aux.rb#126 def each_required_key(&block); end - # source://rbs//lib/rbs/location_aux.rb#47 + # source://rbs//lib/rbs/location_aux.rb#55 def end_column; end - # source://rbs//lib/rbs/location_aux.rb#43 + # source://rbs//lib/rbs/location_aux.rb#51 def end_line; end - # source://rbs//lib/rbs/location_aux.rb#55 + # source://rbs//lib/rbs/location_aux.rb#63 def end_loc; end + # source://rbs//lib/rbs/location_aux.rb#35 def end_pos; end # source://rbs//lib/rbs/location_aux.rb#5 @@ -3679,43 +5250,50 @@ class RBS::Location # @return [Boolean] # - # source://rbs//lib/rbs/location_aux.rb#126 + # source://rbs//lib/rbs/location_aux.rb#134 def key?(name); end - # source://rbs//lib/rbs/location_aux.rb#31 + # source://rbs//lib/rbs/location_aux.rb#146 + def local_location; end + + # source://rbs//lib/rbs/location_aux.rb#166 + def local_source; end + + # source://rbs//lib/rbs/location_aux.rb#39 def name; end # @return [Boolean] # - # source://rbs//lib/rbs/location_aux.rb#130 + # source://rbs//lib/rbs/location_aux.rb#138 def optional_key?(name); end - # source://rbs//lib/rbs/location_aux.rb#59 + # source://rbs//lib/rbs/location_aux.rb#67 def range; end # @return [Boolean] # - # source://rbs//lib/rbs/location_aux.rb#134 + # source://rbs//lib/rbs/location_aux.rb#142 def required_key?(name); end - # source://rbs//lib/rbs/location_aux.rb#63 + # source://rbs//lib/rbs/location_aux.rb#71 def source; end - # source://rbs//lib/rbs/location_aux.rb#39 + # source://rbs//lib/rbs/location_aux.rb#47 def start_column; end - # source://rbs//lib/rbs/location_aux.rb#35 + # source://rbs//lib/rbs/location_aux.rb#43 def start_line; end - # source://rbs//lib/rbs/location_aux.rb#51 + # source://rbs//lib/rbs/location_aux.rb#59 def start_loc; end + # source://rbs//lib/rbs/location_aux.rb#31 def start_pos; end - # source://rbs//lib/rbs/location_aux.rb#78 + # source://rbs//lib/rbs/location_aux.rb#86 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/location_aux.rb#67 + # source://rbs//lib/rbs/location_aux.rb#75 def to_s; end private @@ -3726,7 +5304,7 @@ class RBS::Location # source://rbs//lib/rbs/location_aux.rb#16 def new(buffer_ = T.unsafe(nil), start_pos_ = T.unsafe(nil), end_pos_ = T.unsafe(nil), buffer: T.unsafe(nil), start_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - # source://rbs//lib/rbs/location_aux.rb#94 + # source://rbs//lib/rbs/location_aux.rb#102 def to_string(location, default: T.unsafe(nil)); end end end @@ -3762,28 +5340,28 @@ class RBS::Locator # source://rbs//lib/rbs/locator.rb#29 def find2(line:, column:); end - # source://rbs//lib/rbs/locator.rb#58 + # source://rbs//lib/rbs/locator.rb#60 def find_in_decl(pos, decl:, array:); end # source://rbs//lib/rbs/locator.rb#42 def find_in_directive(pos, dir, array); end - # source://rbs//lib/rbs/locator.rb#206 + # source://rbs//lib/rbs/locator.rb#212 def find_in_loc(pos, location:, array:); end - # source://rbs//lib/rbs/locator.rb#129 + # source://rbs//lib/rbs/locator.rb#131 def find_in_member(pos, member:, array:); end - # source://rbs//lib/rbs/locator.rb#152 + # source://rbs//lib/rbs/locator.rb#154 def find_in_method_type(pos, method_type:, array:); end - # source://rbs//lib/rbs/locator.rb#190 + # source://rbs//lib/rbs/locator.rb#196 def find_in_type(pos, type:, array:); end - # source://rbs//lib/rbs/locator.rb#170 + # source://rbs//lib/rbs/locator.rb#172 def find_in_type_param(pos, type_param:, array:); end - # source://rbs//lib/rbs/locator.rb#233 + # source://rbs//lib/rbs/locator.rb#239 def test_loc(pos, location:); end end @@ -3808,20 +5386,20 @@ class RBS::MethodType # source://rbs//lib/rbs/method_type.rb#7 def block; end - # source://rbs//lib/rbs/method_type.rb#84 + # source://rbs//lib/rbs/method_type.rb#86 def each_type(&block); end - # source://rbs//lib/rbs/method_type.rb#57 + # source://rbs//lib/rbs/method_type.rb#59 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/method_type.rb#125 + # source://rbs//lib/rbs/method_type.rb#127 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/method_type.rb#121 + # source://rbs//lib/rbs/method_type.rb#123 def has_self_type?; end # Returns the value of attribute location. @@ -3829,10 +5407,10 @@ class RBS::MethodType # source://rbs//lib/rbs/method_type.rb#8 def location; end - # source://rbs//lib/rbs/method_type.rb#63 + # source://rbs//lib/rbs/method_type.rb#65 def map_type(&block); end - # source://rbs//lib/rbs/method_type.rb#72 + # source://rbs//lib/rbs/method_type.rb#74 def map_type_bound(&block); end # source://rbs//lib/rbs/method_type.rb#33 @@ -3841,7 +5419,7 @@ class RBS::MethodType # source://rbs//lib/rbs/method_type.rb#24 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/method_type.rb#98 + # source://rbs//lib/rbs/method_type.rb#100 def to_s; end # Returns the value of attribute type. @@ -3849,7 +5427,7 @@ class RBS::MethodType # source://rbs//lib/rbs/method_type.rb#6 def type; end - # source://rbs//lib/rbs/method_type.rb#117 + # source://rbs//lib/rbs/method_type.rb#119 def type_param_names; end # Returns the value of attribute type_params. @@ -3857,44 +5435,47 @@ class RBS::MethodType # source://rbs//lib/rbs/method_type.rb#5 def type_params; end - # source://rbs//lib/rbs/method_type.rb#48 + # source://rbs//lib/rbs/method_type.rb#50 def update(type_params: T.unsafe(nil), type: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/method_type.rb#129 + # source://rbs//lib/rbs/method_type.rb#131 def with_nonreturn_void?; end end -# source://rbs//lib/rbs/errors.rb#443 +# source://rbs//lib/rbs/errors.rb#468 class RBS::MixinClassError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [MixinClassError] a new instance of MixinClassError # - # source://rbs//lib/rbs/errors.rb#449 + # source://rbs//lib/rbs/errors.rb#474 def initialize(type_name:, member:); end - # source://rbs//lib/rbs/errors.rb#456 + # source://rbs//lib/rbs/errors.rb#481 def location; end # Returns the value of attribute member. # - # source://rbs//lib/rbs/errors.rb#447 + # source://rbs//lib/rbs/errors.rb#472 def member; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#446 + # source://rbs//lib/rbs/errors.rb#471 def type_name; end private - # source://rbs//lib/rbs/errors.rb#468 + # source://rbs//lib/rbs/errors.rb#502 + def member_name(member); end + + # source://rbs//lib/rbs/errors.rb#513 def mixin_name; end class << self - # source://rbs//lib/rbs/errors.rb#460 + # source://rbs//lib/rbs/errors.rb#485 def check!(type_name:, env:, member:); end end end @@ -3931,7 +5512,7 @@ class RBS::Namespace # source://rbs//lib/rbs/namespace.rb#55 def empty?; end - # source://rbs//lib/rbs/namespace.rb#59 + # source://rbs//lib/rbs/namespace.rb#63 def eql?(other); end # source://rbs//lib/rbs/namespace.rb#65 @@ -4075,23 +5656,23 @@ class RBS::NoTypeFoundError < ::RBS::DefinitionError end end -# source://rbs//lib/rbs/errors.rb#500 +# source://rbs//lib/rbs/errors.rb#545 class RBS::NonregularTypeAliasError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [NonregularTypeAliasError] a new instance of NonregularTypeAliasError # - # source://rbs//lib/rbs/errors.rb#506 + # source://rbs//lib/rbs/errors.rb#551 def initialize(diagnostic:, location:); end # Returns the value of attribute diagnostic. # - # source://rbs//lib/rbs/errors.rb#503 + # source://rbs//lib/rbs/errors.rb#548 def diagnostic; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#504 + # source://rbs//lib/rbs/errors.rb#549 def location; end end @@ -4099,28 +5680,46 @@ end class RBS::Parser class << self def _lex(_arg0, _arg1); end + def _parse_inline_leading_annotation(_arg0, _arg1, _arg2, _arg3); end + def _parse_inline_trailing_annotation(_arg0, _arg1, _arg2, _arg3); end def _parse_method_type(_arg0, _arg1, _arg2, _arg3, _arg4); end - def _parse_signature(_arg0, _arg1); end - def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4); end + def _parse_signature(_arg0, _arg1, _arg2); end + def _parse_type(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); end + def _parse_type_params(_arg0, _arg1, _arg2, _arg3); end - # source://rbs//lib/rbs/parser_aux.rb#34 + # source://rbs//lib/rbs/parser_aux.rb#79 def buffer(source); end - # source://rbs//lib/rbs/parser_aux.rb#25 + # source://rbs//lib/rbs/parser_aux.rb#132 + def byte_range(char_range, content); end + + # source://rbs//lib/rbs/parser_aux.rb#70 def lex(source); end - # source://rbs//lib/rbs/parser_aux.rb#13 - def parse_method_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + # source://rbs//lib/rbs/parser_aux.rb#46 + def magic_comment(buf); end + + # source://rbs//lib/rbs/parser_aux.rb#122 + def parse_inline_leading_annotation(source, range, variables: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#127 + def parse_inline_trailing_annotation(source, range, variables: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#14 + def parse_method_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end - # source://rbs//lib/rbs/parser_aux.rb#18 + # source://rbs//lib/rbs/parser_aux.rb#20 def parse_signature(source); end # source://rbs//lib/rbs/parser_aux.rb#8 - def parse_type(source, range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil)); end + def parse_type(source, range: T.unsafe(nil), byte_range: T.unsafe(nil), variables: T.unsafe(nil), require_eof: T.unsafe(nil), void_allowed: T.unsafe(nil), self_allowed: T.unsafe(nil), classish_allowed: T.unsafe(nil)); end + + # source://rbs//lib/rbs/parser_aux.rb#41 + def parse_type_params(source, module_type_params: T.unsafe(nil)); end end end -# source://rbs//lib/rbs/parser_aux.rb#43 +# source://rbs//lib/rbs/parser_aux.rb#88 RBS::Parser::KEYWORDS = T.let(T.unsafe(nil), Hash) # source://rbs//lib/rbs/parser/lex_result.rb#5 @@ -4201,35 +5800,38 @@ module RBS::Prototype::Helpers # @return [Boolean] # - # source://rbs//lib/rbs/prototype/helpers.rb#96 + # source://rbs//lib/rbs/prototype/helpers.rb#153 def any_node?(node, nodes: T.unsafe(nil), &block); end # NOTE: args_node may be a nil by a bug # https://bugs.ruby-lang.org/issues/17495 # - # source://rbs//lib/rbs/prototype/helpers.rb#120 + # source://rbs//lib/rbs/prototype/helpers.rb#177 def args_from_node(args_node); end - # source://rbs//lib/rbs/prototype/helpers.rb#8 + # source://rbs//lib/rbs/prototype/helpers.rb#65 def block_from_body(node); end - # source://rbs//lib/rbs/prototype/helpers.rb#84 + # source://rbs//lib/rbs/prototype/helpers.rb#141 def each_child(node, &block); end - # source://rbs//lib/rbs/prototype/helpers.rb#88 + # source://rbs//lib/rbs/prototype/helpers.rb#145 def each_node(nodes); end # @return [Boolean] # - # source://rbs//lib/rbs/prototype/helpers.rb#108 + # source://rbs//lib/rbs/prototype/helpers.rb#165 def keyword_hash?(node); end + # source://rbs//lib/rbs/prototype/helpers.rb#10 + def parse_comments(string, include_trailing:); end + # @return [Boolean] # - # source://rbs//lib/rbs/prototype/helpers.rb#124 + # source://rbs//lib/rbs/prototype/helpers.rb#181 def symbol_literal_node?(node); end - # source://rbs//lib/rbs/prototype/helpers.rb#135 + # source://rbs//lib/rbs/prototype/helpers.rb#192 def untyped; end end @@ -4263,77 +5865,77 @@ class RBS::Prototype::RB # source://rbs//lib/rbs/prototype/rb.rb#45 def initialize; end - # source://rbs//lib/rbs/prototype/rb.rb#560 + # source://rbs//lib/rbs/prototype/rb.rb#536 def block_type(node); end - # source://rbs//lib/rbs/prototype/rb.rb#540 + # source://rbs//lib/rbs/prototype/rb.rb#516 def body_type(node); end - # source://rbs//lib/rbs/prototype/rb.rb#455 + # source://rbs//lib/rbs/prototype/rb.rb#431 def const_to_name(node, context:); end - # source://rbs//lib/rbs/prototype/rb.rb#432 + # source://rbs//lib/rbs/prototype/rb.rb#408 def const_to_name!(node, context: T.unsafe(nil)); end - # source://rbs//lib/rbs/prototype/rb.rb#771 + # source://rbs//lib/rbs/prototype/rb.rb#747 def current_accessibility(decls, index = T.unsafe(nil)); end # source://rbs//lib/rbs/prototype/rb.rb#49 def decls; end - # source://rbs//lib/rbs/prototype/rb.rb#811 + # source://rbs//lib/rbs/prototype/rb.rb#787 def find_def_index_by_name(decls, name); end - # source://rbs//lib/rbs/prototype/rb.rb#535 + # source://rbs//lib/rbs/prototype/rb.rb#511 def function_return_type_from_body(node); end - # source://rbs//lib/rbs/prototype/rb.rb#477 + # source://rbs//lib/rbs/prototype/rb.rb#453 def function_type_from_body(node, def_name); end - # source://rbs//lib/rbs/prototype/rb.rb#553 + # source://rbs//lib/rbs/prototype/rb.rb#529 def if_unless_type(node); end # @return [Boolean] # - # source://rbs//lib/rbs/prototype/rb.rb#807 + # source://rbs//lib/rbs/prototype/rb.rb#783 def is_accessibility?(decl); end - # source://rbs//lib/rbs/prototype/rb.rb#466 + # source://rbs//lib/rbs/prototype/rb.rb#442 def literal_to_symbol(node); end - # source://rbs//lib/rbs/prototype/rb.rb#574 + # source://rbs//lib/rbs/prototype/rb.rb#550 def literal_to_type(node); end # backward compatible # - # source://rbs//lib/rbs/prototype/rb.rb#718 + # source://rbs//lib/rbs/prototype/rb.rb#737 def node_type(node, default: T.unsafe(nil)); end - # source://rbs//lib/rbs/prototype/rb.rb#718 + # source://rbs//lib/rbs/prototype/rb.rb#694 def param_type(node, default: T.unsafe(nil)); end # source://rbs//lib/rbs/prototype/rb.rb#75 def parse(string); end - # source://rbs//lib/rbs/prototype/rb.rb#763 + # source://rbs//lib/rbs/prototype/rb.rb#739 def private; end - # source://rbs//lib/rbs/prototype/rb.rb#107 + # source://rbs//lib/rbs/prototype/rb.rb#82 def process(node, decls:, comments:, context:); end - # source://rbs//lib/rbs/prototype/rb.rb#426 + # source://rbs//lib/rbs/prototype/rb.rb#402 def process_children(node, decls:, comments:, context:); end - # source://rbs//lib/rbs/prototype/rb.rb#767 + # source://rbs//lib/rbs/prototype/rb.rb#743 def public; end - # source://rbs//lib/rbs/prototype/rb.rb#698 + # source://rbs//lib/rbs/prototype/rb.rb#674 def range_element_type(types); end - # source://rbs//lib/rbs/prototype/rb.rb#781 + # source://rbs//lib/rbs/prototype/rb.rb#757 def remove_unnecessary_accessibility_methods!(decls); end - # source://rbs//lib/rbs/prototype/rb.rb#829 + # source://rbs//lib/rbs/prototype/rb.rb#805 def sort_members!(decls); end # Returns the value of attribute source_decls. @@ -4346,7 +5948,7 @@ class RBS::Prototype::RB # source://rbs//lib/rbs/prototype/rb.rb#43 def toplevel_members; end - # source://rbs//lib/rbs/prototype/rb.rb#687 + # source://rbs//lib/rbs/prototype/rb.rb#663 def types_to_union_type(types); end end @@ -4381,19 +5983,19 @@ class RBS::Prototype::RBI # @return [Boolean] # - # source://rbs//lib/rbs/prototype/rbi.rb#561 + # source://rbs//lib/rbs/prototype/rbi.rb#545 def call_node?(node, name:, receiver: T.unsafe(nil), args: T.unsafe(nil)); end - # source://rbs//lib/rbs/prototype/rbi.rb#565 + # source://rbs//lib/rbs/prototype/rbi.rb#549 def const_to_name(node); end - # source://rbs//lib/rbs/prototype/rbi.rb#90 + # source://rbs//lib/rbs/prototype/rbi.rb#71 def current_module; end - # source://rbs//lib/rbs/prototype/rbi.rb#94 + # source://rbs//lib/rbs/prototype/rbi.rb#75 def current_module!; end - # source://rbs//lib/rbs/prototype/rbi.rb#46 + # source://rbs//lib/rbs/prototype/rbi.rb#27 def current_namespace; end # Returns the value of attribute decls. @@ -4401,13 +6003,13 @@ class RBS::Prototype::RBI # source://rbs//lib/rbs/prototype/rbi.rb#8 def decls; end - # source://rbs//lib/rbs/prototype/rbi.rb#601 + # source://rbs//lib/rbs/prototype/rbi.rb#585 def each_arg(array, &block); end - # source://rbs//lib/rbs/prototype/rbi.rb#615 + # source://rbs//lib/rbs/prototype/rbi.rb#599 def each_child(node); end - # source://rbs//lib/rbs/prototype/rbi.rb#112 + # source://rbs//lib/rbs/prototype/rbi.rb#93 def join_comments(nodes, comments); end # Returns the value of attribute last_sig. @@ -4415,7 +6017,7 @@ class RBS::Prototype::RBI # source://rbs//lib/rbs/prototype/rbi.rb#10 def last_sig; end - # source://rbs//lib/rbs/prototype/rbi.rb#279 + # source://rbs//lib/rbs/prototype/rbi.rb#262 def method_type(args_node, type_node, variables:, overloads:); end # Returns the value of attribute modules. @@ -4423,42 +6025,42 @@ class RBS::Prototype::RBI # source://rbs//lib/rbs/prototype/rbi.rb#9 def modules; end - # source://rbs//lib/rbs/prototype/rbi.rb#42 + # source://rbs//lib/rbs/prototype/rbi.rb#23 def nested_name(name); end - # source://rbs//lib/rbs/prototype/rbi.rb#623 + # source://rbs//lib/rbs/prototype/rbi.rb#607 def node_to_hash(node); end # source://rbs//lib/rbs/prototype/rbi.rb#18 def parse(string); end - # source://rbs//lib/rbs/prototype/rbi.rb#351 + # source://rbs//lib/rbs/prototype/rbi.rb#335 def parse_params(args_node, args, method_type, variables:, overloads:); end - # source://rbs//lib/rbs/prototype/rbi.rb#106 + # source://rbs//lib/rbs/prototype/rbi.rb#87 def pop_sig; end # @return [Boolean] # - # source://rbs//lib/rbs/prototype/rbi.rb#553 + # source://rbs//lib/rbs/prototype/rbi.rb#537 def proc_type?(type_node); end - # source://rbs//lib/rbs/prototype/rbi.rb#117 + # source://rbs//lib/rbs/prototype/rbi.rb#98 def process(node, comments:, outer: T.unsafe(nil)); end - # source://rbs//lib/rbs/prototype/rbi.rb#52 + # source://rbs//lib/rbs/prototype/rbi.rb#33 def push_class(name, super_class, comment:); end - # source://rbs//lib/rbs/prototype/rbi.rb#71 + # source://rbs//lib/rbs/prototype/rbi.rb#52 def push_module(name, comment:); end - # source://rbs//lib/rbs/prototype/rbi.rb#98 + # source://rbs//lib/rbs/prototype/rbi.rb#79 def push_sig(node); end - # source://rbs//lib/rbs/prototype/rbi.rb#476 + # source://rbs//lib/rbs/prototype/rbi.rb#460 def type_of(type_node, variables:); end - # source://rbs//lib/rbs/prototype/rbi.rb#489 + # source://rbs//lib/rbs/prototype/rbi.rb#473 def type_of0(type_node, variables:); end end @@ -4469,119 +6071,119 @@ class RBS::Prototype::Runtime # @return [Runtime] a new instance of Runtime # - # source://rbs//lib/rbs/prototype/runtime.rb#71 + # source://rbs//lib/rbs/prototype/runtime.rb#79 def initialize(patterns:, env:, merge:, todo: T.unsafe(nil), owners_included: T.unsafe(nil)); end - # source://rbs//lib/rbs/prototype/runtime.rb#651 + # source://rbs//lib/rbs/prototype/runtime.rb#662 def block_from_ast_of(method); end - # source://rbs//lib/rbs/prototype/runtime.rb#101 + # source://rbs//lib/rbs/prototype/runtime.rb#109 def builder; end - # source://rbs//lib/rbs/prototype/runtime.rb#109 + # source://rbs//lib/rbs/prototype/runtime.rb#117 def decls; end # Generate/find outer module declarations # This is broken down into another method to comply with `DRY` # This generates/finds declarations in nested form & returns the last array of declarations # - # source://rbs//lib/rbs/prototype/runtime.rb#580 + # source://rbs//lib/rbs/prototype/runtime.rb#591 def ensure_outer_module_declarations(mod); end # Returns the value of attribute env. # - # source://rbs//lib/rbs/prototype/runtime.rb#65 + # source://rbs//lib/rbs/prototype/runtime.rb#73 def env; end - # source://rbs//lib/rbs/prototype/runtime.rb#485 + # source://rbs//lib/rbs/prototype/runtime.rb#496 def generate_class(mod); end - # source://rbs//lib/rbs/prototype/runtime.rb#423 + # source://rbs//lib/rbs/prototype/runtime.rb#433 def generate_constants(mod, decls); end - # source://rbs//lib/rbs/prototype/runtime.rb#299 + # source://rbs//lib/rbs/prototype/runtime.rb#309 def generate_methods(mod, module_name, members); end - # source://rbs//lib/rbs/prototype/runtime.rb#562 + # source://rbs//lib/rbs/prototype/runtime.rb#573 def generate_mixin(mod, decl, type_name, type_name_absolute); end - # source://rbs//lib/rbs/prototype/runtime.rb#524 + # source://rbs//lib/rbs/prototype/runtime.rb#535 def generate_module(mod); end - # source://rbs//lib/rbs/prototype/runtime.rb#470 + # source://rbs//lib/rbs/prototype/runtime.rb#481 def generate_super_class(mod); end # Returns the value of attribute merge. # - # source://rbs//lib/rbs/prototype/runtime.rb#66 + # source://rbs//lib/rbs/prototype/runtime.rb#74 def merge; end - # source://rbs//lib/rbs/prototype/runtime.rb#240 + # source://rbs//lib/rbs/prototype/runtime.rb#248 def merge_rbs(module_name, members, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end - # source://rbs//lib/rbs/prototype/runtime.rb#171 + # source://rbs//lib/rbs/prototype/runtime.rb#179 def method_type(method); end # Returns the value of attribute outline. # - # source://rbs//lib/rbs/prototype/runtime.rb#69 + # source://rbs//lib/rbs/prototype/runtime.rb#77 def outline; end # Sets the attribute outline # # @param value the value to set the attribute outline to. # - # source://rbs//lib/rbs/prototype/runtime.rb#69 + # source://rbs//lib/rbs/prototype/runtime.rb#77 def outline=(_arg0); end # Returns the value of attribute owners_included. # - # source://rbs//lib/rbs/prototype/runtime.rb#68 + # source://rbs//lib/rbs/prototype/runtime.rb#76 def owners_included; end - # source://rbs//lib/rbs/prototype/runtime.rb#105 + # source://rbs//lib/rbs/prototype/runtime.rb#113 def parse(file); end # Returns the value of attribute patterns. # - # source://rbs//lib/rbs/prototype/runtime.rb#64 + # source://rbs//lib/rbs/prototype/runtime.rb#72 def patterns; end # @return [Boolean] # - # source://rbs//lib/rbs/prototype/runtime.rb#84 + # source://rbs//lib/rbs/prototype/runtime.rb#92 def target?(const); end # @return [Boolean] # - # source://rbs//lib/rbs/prototype/runtime.rb#286 + # source://rbs//lib/rbs/prototype/runtime.rb#296 def target_method?(mod, instance: T.unsafe(nil), singleton: T.unsafe(nil)); end # Returns the value of attribute todo. # - # source://rbs//lib/rbs/prototype/runtime.rb#67 + # source://rbs//lib/rbs/prototype/runtime.rb#75 def todo; end - # source://rbs//lib/rbs/prototype/runtime.rb#97 + # source://rbs//lib/rbs/prototype/runtime.rb#105 def todo_object; end - # source://rbs//lib/rbs/prototype/runtime.rb#634 + # source://rbs//lib/rbs/prototype/runtime.rb#645 def type_args(type_name); end - # source://rbs//lib/rbs/prototype/runtime.rb#642 + # source://rbs//lib/rbs/prototype/runtime.rb#653 def type_params(mod); end private # @return [Boolean] # - # source://rbs//lib/rbs/prototype/runtime.rb#413 + # source://rbs//lib/rbs/prototype/runtime.rb#423 def can_alias?(mod, method); end - # source://rbs//lib/rbs/prototype/runtime.rb#129 + # source://rbs//lib/rbs/prototype/runtime.rb#137 def each_mixined_module(type_name, mod); end - # source://rbs//lib/rbs/prototype/runtime.rb#138 + # source://rbs//lib/rbs/prototype/runtime.rb#146 def each_mixined_module_one(type_name, mod); end end @@ -4689,12 +6291,12 @@ class RBS::Prototype::Runtime::Todo # @return [Boolean] # - # source://rbs//lib/rbs/prototype/runtime.rb#42 + # source://rbs//lib/rbs/prototype/runtime.rb#50 def skip_constant?(module_name:, name:); end # @return [Boolean] # - # source://rbs//lib/rbs/prototype/runtime.rb#33 + # source://rbs//lib/rbs/prototype/runtime.rb#37 def skip_instance_method?(module_name:, method:, accessibility:); end # @return [Boolean] @@ -4709,7 +6311,7 @@ class RBS::Prototype::Runtime::Todo private - # source://rbs//lib/rbs/prototype/runtime.rb#49 + # source://rbs//lib/rbs/prototype/runtime.rb#57 def mixin_decls(type_name); end end @@ -4739,102 +6341,26 @@ class RBS::Prototype::Runtime::ValueObjectBase def build_s_members; end end -# source://rbs//lib/rdoc_plugin/parser.rb#6 -module RBS::RDocPlugin; end - -# source://rbs//lib/rdoc_plugin/parser.rb#7 -class RBS::RDocPlugin::Parser - # @return [Parser] a new instance of Parser - # - # source://rbs//lib/rdoc_plugin/parser.rb#11 - def initialize(top_level, content); end - - # Returns the value of attribute content. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def content; end - - # Sets the attribute content - # - # @param value the value to set the attribute content to. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def content=(_arg0); end - - # source://rbs//lib/rdoc_plugin/parser.rb#94 - def parse_attr_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#53 - def parse_class_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#67 - def parse_constant_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#125 - def parse_extend_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#109 - def parse_include_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#24 - def parse_member(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#88 - def parse_method_alias_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#73 - def parse_method_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#60 - def parse_module_decl(decl:, context:, outer_name: T.unsafe(nil)); end - - # source://rbs//lib/rdoc_plugin/parser.rb#16 - def scan; end - - # Returns the value of attribute top_level. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def top_level; end - - # Sets the attribute top_level - # - # @param value the value to set the attribute top_level to. - # - # source://rbs//lib/rdoc_plugin/parser.rb#9 - def top_level=(_arg0); end - - private - - # source://rbs//lib/rdoc_plugin/parser.rb#149 - def comment_string(with_comment); end - - # source://rbs//lib/rdoc_plugin/parser.rb#143 - def construct_comment(context:, comment:); end - - # source://rbs//lib/rdoc_plugin/parser.rb#154 - def fully_qualified_name(outer_name:, decl:); end -end - -# source://rbs//lib/rbs/errors.rb#423 +# source://rbs//lib/rbs/errors.rb#448 class RBS::RecursiveAliasDefinitionError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [RecursiveAliasDefinitionError] a new instance of RecursiveAliasDefinitionError # - # source://rbs//lib/rbs/errors.rb#429 + # source://rbs//lib/rbs/errors.rb#454 def initialize(type:, defs:); end # Returns the value of attribute defs. # - # source://rbs//lib/rbs/errors.rb#427 + # source://rbs//lib/rbs/errors.rb#452 def defs; end - # source://rbs//lib/rbs/errors.rb#436 + # source://rbs//lib/rbs/errors.rb#461 def location; end # Returns the value of attribute type. # - # source://rbs//lib/rbs/errors.rb#426 + # source://rbs//lib/rbs/errors.rb#451 def type; end end @@ -4861,26 +6387,26 @@ class RBS::RecursiveAncestorError < ::RBS::DefinitionError end end -# source://rbs//lib/rbs/errors.rb#482 +# source://rbs//lib/rbs/errors.rb#527 class RBS::RecursiveTypeAliasError < ::RBS::BaseError include ::RBS::DetailedMessageable # @return [RecursiveTypeAliasError] a new instance of RecursiveTypeAliasError # - # source://rbs//lib/rbs/errors.rb#488 + # source://rbs//lib/rbs/errors.rb#533 def initialize(alias_names:, location:); end # Returns the value of attribute alias_names. # - # source://rbs//lib/rbs/errors.rb#485 + # source://rbs//lib/rbs/errors.rb#530 def alias_names; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#486 + # source://rbs//lib/rbs/errors.rb#531 def location; end - # source://rbs//lib/rbs/errors.rb#495 + # source://rbs//lib/rbs/errors.rb#540 def name; end end @@ -4965,18 +6491,38 @@ end # source://rbs//lib/rbs/repository.rb#69 class RBS::Repository::VersionPath < ::Struct + # source://rbs//lib/rbs/repository.rb#69 def gem; end + + # source://rbs//lib/rbs/repository.rb#69 def gem=(_); end + + # source://rbs//lib/rbs/repository.rb#69 def path; end + + # source://rbs//lib/rbs/repository.rb#69 def path=(_); end + + # source://rbs//lib/rbs/repository.rb#69 def version; end + + # source://rbs//lib/rbs/repository.rb#69 def version=(_); end class << self + # source://rbs//lib/rbs/repository.rb#69 def [](*_arg0); end + + # source://rbs//lib/rbs/repository.rb#69 def inspect; end + + # source://rbs//lib/rbs/repository.rb#69 def keyword_init?; end + + # source://rbs//lib/rbs/repository.rb#69 def members; end + + # source://rbs//lib/rbs/repository.rb#69 def new(*_arg0); end end end @@ -5079,7 +6625,17 @@ class RBS::Resolver::TypeNameResolver # @return [TypeNameResolver] a new instance of TypeNameResolver # # source://rbs//lib/rbs/resolver/type_name_resolver.rb#10 - def initialize(env); end + def initialize(all_names, aliases); end + + # @return [Boolean] + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#82 + def aliased_name?(type_name); end + + # Returns the value of attribute aliases. + # + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#8 + def aliases; end # Returns the value of attribute all_names. # @@ -5091,27 +6647,102 @@ class RBS::Resolver::TypeNameResolver # source://rbs//lib/rbs/resolver/type_name_resolver.rb#7 def cache; end - # Returns the value of attribute env. - # - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#8 - def env; end - # @return [Boolean] # - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#84 - def has_name?(full_name); end + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#76 + def has_type_name?(full_name); end - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#51 - def partition(type_name); end + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#121 + def normalize_namespace(type_name, rhs, context, visited); end - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#28 + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#39 def resolve(type_name, context:); end - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#69 - def resolve_in(head, context); end + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#104 + def resolve_head_namespace(head, context); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#62 + def resolve_namespace(type_name, context:); end - # source://rbs//lib/rbs/resolver/type_name_resolver.rb#21 + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#136 + def resolve_namespace0(type_name, context, visited); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#88 + def resolve_type_name(type_name, context); end + + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#32 def try_cache(query); end + + class << self + # source://rbs//lib/rbs/resolver/type_name_resolver.rb#16 + def build(env); end + end +end + +# source://rbs//lib/rbs/source.rb#4 +module RBS::Source; end + +# source://rbs//lib/rbs/source.rb#5 +class RBS::Source::RBS + # @return [RBS] a new instance of RBS + # + # source://rbs//lib/rbs/source.rb#8 + def initialize(buffer, directives, decls); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/source.rb#6 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/source.rb#6 + def declarations; end + + # Returns the value of attribute directives. + # + # source://rbs//lib/rbs/source.rb#6 + def directives; end + + # source://rbs//lib/rbs/source.rb#25 + def each_declaration_type_name(names, decl, &block); end + + # source://rbs//lib/rbs/source.rb#14 + def each_type_name(&block); end +end + +# source://rbs//lib/rbs/source.rb#52 +class RBS::Source::Ruby + # @return [Ruby] a new instance of Ruby + # + # source://rbs//lib/rbs/source.rb#58 + def initialize(buffer, prism, declarations, diagnostics); end + + # Returns the value of attribute buffer. + # + # source://rbs//lib/rbs/source.rb#53 + def buffer; end + + # Returns the value of attribute declarations. + # + # source://rbs//lib/rbs/source.rb#55 + def declarations; end + + # Returns the value of attribute diagnostics. + # + # source://rbs//lib/rbs/source.rb#56 + def diagnostics; end + + # source://rbs//lib/rbs/source.rb#76 + def each_declaration_type_name(names, decl, &block); end + + # source://rbs//lib/rbs/source.rb#65 + def each_type_name(&block); end + + # Returns the value of attribute prism_result. + # + # source://rbs//lib/rbs/source.rb#54 + def prism_result; end end # source://rbs//lib/rbs/substitution.rb#4 @@ -5124,7 +6755,7 @@ class RBS::Substitution # source://rbs//lib/rbs/substitution.rb#66 def +(other); end - # source://rbs//lib/rbs/substitution.rb#37 + # source://rbs//lib/rbs/substitution.rb#53 def [](ty); end # source://rbs//lib/rbs/substitution.rb#16 @@ -5176,27 +6807,27 @@ class RBS::Subtractor private - # source://rbs//lib/rbs/subtractor.rb#177 + # source://rbs//lib/rbs/subtractor.rb#180 def absolute_typename(name, context:); end # @return [Boolean] # - # source://rbs//lib/rbs/subtractor.rb#160 + # source://rbs//lib/rbs/subtractor.rb#163 def access_modifier?(decl); end # @return [Boolean] # - # source://rbs//lib/rbs/subtractor.rb#118 + # source://rbs//lib/rbs/subtractor.rb#120 def cvar_exist?(owner, name); end - # source://rbs//lib/rbs/subtractor.rb#127 + # source://rbs//lib/rbs/subtractor.rb#129 def each_member(owner, &block); end # source://rbs//lib/rbs/subtractor.rb#48 def filter_members(decl, context:); end - # source://rbs//lib/rbs/subtractor.rb#148 - def filter_redundunt_access_modifiers(decls); end + # source://rbs//lib/rbs/subtractor.rb#151 + def filter_redundant_access_modifiers(decls); end # @return [Boolean] # @@ -5215,31 +6846,31 @@ class RBS::Subtractor # @return [Boolean] # - # source://rbs//lib/rbs/subtractor.rb#137 + # source://rbs//lib/rbs/subtractor.rb#140 def mixin_exist?(owner, mixin, context:); end - # source://rbs//lib/rbs/subtractor.rb#186 + # source://rbs//lib/rbs/subtractor.rb#189 def typename_candidates(name, context:); end - # source://rbs//lib/rbs/subtractor.rb#164 + # source://rbs//lib/rbs/subtractor.rb#167 def update_decl(decl, members:); end end -# source://rbs//lib/rbs/errors.rb#343 +# source://rbs//lib/rbs/errors.rb#367 class RBS::SuperclassMismatchError < ::RBS::DefinitionError # @return [SuperclassMismatchError] a new instance of SuperclassMismatchError # - # source://rbs//lib/rbs/errors.rb#347 + # source://rbs//lib/rbs/errors.rb#371 def initialize(name:, entry:); end # Returns the value of attribute entry. # - # source://rbs//lib/rbs/errors.rb#345 + # source://rbs//lib/rbs/errors.rb#369 def entry; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/errors.rb#344 + # source://rbs//lib/rbs/errors.rb#368 def name; end end @@ -5401,7 +7032,7 @@ class RBS::TypeName # source://rbs//lib/rbs/type_name.rb#47 def class?; end - # source://rbs//lib/rbs/type_name.rb#25 + # source://rbs//lib/rbs/type_name.rb#29 def eql?(other); end # source://rbs//lib/rbs/type_name.rb#31 @@ -5451,27 +7082,27 @@ class RBS::TypeName end end -# source://rbs//lib/rbs/errors.rb#580 +# source://rbs//lib/rbs/errors.rb#614 class RBS::TypeParamDefaultReferenceError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [TypeParamDefaultReferenceError] a new instance of TypeParamDefaultReferenceError # - # source://rbs//lib/rbs/errors.rb#586 + # source://rbs//lib/rbs/errors.rb#620 def initialize(type_param, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#584 + # source://rbs//lib/rbs/errors.rb#618 def location; end # Returns the value of attribute type_param. # - # source://rbs//lib/rbs/errors.rb#583 + # source://rbs//lib/rbs/errors.rb#617 def type_param; end class << self - # source://rbs//lib/rbs/errors.rb#592 + # source://rbs//lib/rbs/errors.rb#626 def check!(type_params); end end end @@ -5479,76 +7110,76 @@ end # source://rbs//lib/rbs/types.rb#4 module RBS::Types; end -# source://rbs//lib/rbs/types.rb#394 +# source://rbs//lib/rbs/types.rb#410 class RBS::Types::Alias include ::RBS::Types::Application # @return [Alias] a new instance of Alias # - # source://rbs//lib/rbs/types.rb#399 + # source://rbs//lib/rbs/types.rb#415 def initialize(name:, args:, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#395 + # source://rbs//lib/rbs/types.rb#411 def location; end - # source://rbs//lib/rbs/types.rb#421 + # source://rbs//lib/rbs/types.rb#439 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#413 + # source://rbs//lib/rbs/types.rb#431 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#409 + # source://rbs//lib/rbs/types.rb#425 def sub(s); end - # source://rbs//lib/rbs/types.rb#405 + # source://rbs//lib/rbs/types.rb#421 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/types.rb#252 +# source://rbs//lib/rbs/types.rb#202 module RBS::Types::Application - # source://rbs//lib/rbs/types.rb#256 + # source://rbs//lib/rbs/types.rb#206 def ==(other); end # Returns the value of attribute args. # - # source://rbs//lib/rbs/types.rb#254 + # source://rbs//lib/rbs/types.rb#204 def args; end - # source://rbs//lib/rbs/types.rb#282 + # source://rbs//lib/rbs/types.rb#232 def each_type(&block); end - # source://rbs//lib/rbs/types.rb#256 + # source://rbs//lib/rbs/types.rb#210 def eql?(other); end - # source://rbs//lib/rbs/types.rb#266 + # source://rbs//lib/rbs/types.rb#216 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#294 + # source://rbs//lib/rbs/types.rb#244 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#290 + # source://rbs//lib/rbs/types.rb#240 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#262 + # source://rbs//lib/rbs/types.rb#212 def hash; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/types.rb#253 + # source://rbs//lib/rbs/types.rb#203 def name; end - # source://rbs//lib/rbs/types.rb#274 + # source://rbs//lib/rbs/types.rb#224 def to_s(level = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#298 + # source://rbs//lib/rbs/types.rb#248 def with_nonreturn_void?; end end @@ -5557,11 +7188,13 @@ module RBS::Types::Bases; end # source://rbs//lib/rbs/types.rb#109 class RBS::Types::Bases::Any < ::RBS::Types::Bases::Base + # @return [Any] a new instance of Any + # # source://rbs//lib/rbs/types.rb#110 - def to_s(level = T.unsafe(nil)); end + def initialize(location:, todo: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#114 - def todo!; end + # source://rbs//lib/rbs/types.rb#117 + def to_s(level = T.unsafe(nil)); end end # source://rbs//lib/rbs/types.rb#42 @@ -5579,7 +7212,7 @@ class RBS::Types::Bases::Base # source://rbs//lib/rbs/types.rb#49 def ==(other); end - # source://rbs//lib/rbs/types.rb#49 + # source://rbs//lib/rbs/types.rb#57 def eql?(other); end # @return [Boolean] @@ -5615,145 +7248,134 @@ end # source://rbs//lib/rbs/types.rb#107 class RBS::Types::Bases::Bool < ::RBS::Types::Bases::Base; end -# source://rbs//lib/rbs/types.rb#121 +# source://rbs//lib/rbs/types.rb#123 class RBS::Types::Bases::Bottom < ::RBS::Types::Bases::Base; end -# source://rbs//lib/rbs/types.rb#128 +# source://rbs//lib/rbs/types.rb#130 class RBS::Types::Bases::Class < ::RBS::Types::Bases::Base; end -# source://rbs//lib/rbs/types.rb#123 +# source://rbs//lib/rbs/types.rb#125 class RBS::Types::Bases::Instance < ::RBS::Types::Bases::Base - # source://rbs//lib/rbs/types.rb#124 + # source://rbs//lib/rbs/types.rb#126 def sub(s); end end -# source://rbs//lib/rbs/types.rb#119 +# source://rbs//lib/rbs/types.rb#121 class RBS::Types::Bases::Nil < ::RBS::Types::Bases::Base; end -# source://rbs//lib/rbs/types.rb#122 +# source://rbs//lib/rbs/types.rb#124 class RBS::Types::Bases::Self < ::RBS::Types::Bases::Base; end -# source://rbs//lib/rbs/types.rb#120 +# source://rbs//lib/rbs/types.rb#122 class RBS::Types::Bases::Top < ::RBS::Types::Bases::Base; end # source://rbs//lib/rbs/types.rb#108 class RBS::Types::Bases::Void < ::RBS::Types::Bases::Base; end -# source://rbs//lib/rbs/types.rb#1307 +# source://rbs//lib/rbs/types.rb#1348 class RBS::Types::Block # @return [Block] a new instance of Block # - # source://rbs//lib/rbs/types.rb#1312 - def initialize(type:, required:, self_type: T.unsafe(nil)); end + # source://rbs//lib/rbs/types.rb#1354 + def initialize(type:, required:, location: T.unsafe(nil), self_type: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1318 + # source://rbs//lib/rbs/types.rb#1361 def ==(other); end - # source://rbs//lib/rbs/types.rb#1341 + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/types.rb#1352 + def location; end + + # source://rbs//lib/rbs/types.rb#1386 def map_type(&block); end # Returns the value of attribute required. # - # source://rbs//lib/rbs/types.rb#1309 + # source://rbs//lib/rbs/types.rb#1350 def required; end # Returns the value of attribute self_type. # - # source://rbs//lib/rbs/types.rb#1310 + # source://rbs//lib/rbs/types.rb#1351 def self_type; end - # source://rbs//lib/rbs/types.rb#1333 + # source://rbs//lib/rbs/types.rb#1376 def sub(s); end - # source://rbs//lib/rbs/types.rb#1325 + # source://rbs//lib/rbs/types.rb#1368 def to_json(state = T.unsafe(nil)); end # Returns the value of attribute type. # - # source://rbs//lib/rbs/types.rb#1308 + # source://rbs//lib/rbs/types.rb#1349 def type; end end -# source://rbs//lib/rbs/types.rb#352 +# source://rbs//lib/rbs/types.rb#366 class RBS::Types::ClassInstance include ::RBS::Types::Application # @return [ClassInstance] a new instance of ClassInstance # - # source://rbs//lib/rbs/types.rb#357 + # source://rbs//lib/rbs/types.rb#371 def initialize(name:, args:, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#353 + # source://rbs//lib/rbs/types.rb#367 def location; end - # source://rbs//lib/rbs/types.rb#381 + # source://rbs//lib/rbs/types.rb#397 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#373 + # source://rbs//lib/rbs/types.rb#389 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#367 + # source://rbs//lib/rbs/types.rb#381 def sub(s); end - # source://rbs//lib/rbs/types.rb#363 + # source://rbs//lib/rbs/types.rb#377 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/types.rb#200 +# source://rbs//lib/rbs/types.rb#260 class RBS::Types::ClassSingleton - include ::RBS::Types::NoFreeVariables - include ::RBS::Types::NoSubst - include ::RBS::Types::EmptyEachType + include ::RBS::Types::Application # @return [ClassSingleton] a new instance of ClassSingleton # - # source://rbs//lib/rbs/types.rb#204 - def initialize(name:, location:); end + # source://rbs//lib/rbs/types.rb#265 + def initialize(name:, location:, args: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#209 + # source://rbs//lib/rbs/types.rb#271 def ==(other); end - # source://rbs//lib/rbs/types.rb#209 + # source://rbs//lib/rbs/types.rb#275 def eql?(other); end - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#243 - def has_classish_type?; end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#239 - def has_self_type?; end - - # source://rbs//lib/rbs/types.rb#215 + # source://rbs//lib/rbs/types.rb#277 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#202 + # source://rbs//lib/rbs/types.rb#261 def location; end - # source://rbs//lib/rbs/types.rb#232 - def map_type_name; end + # source://rbs//lib/rbs/types.rb#309 + def map_type(&block); end - # Returns the value of attribute name. - # - # source://rbs//lib/rbs/types.rb#201 - def name; end + # source://rbs//lib/rbs/types.rb#301 + def map_type_name(&block); end + + # source://rbs//lib/rbs/types.rb#281 + def sub(s); end - # source://rbs//lib/rbs/types.rb#222 + # source://rbs//lib/rbs/types.rb#289 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#226 + # source://rbs//lib/rbs/types.rb#293 def to_s(level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://rbs//lib/rbs/types.rb#247 - def with_nonreturn_void?; end end # source://rbs//lib/rbs/types.rb#23 @@ -5765,270 +7387,270 @@ module RBS::Types::EmptyEachType def map_type(&block); end end -# source://rbs//lib/rbs/types.rb#878 +# source://rbs//lib/rbs/types.rb#915 class RBS::Types::Function # @return [Function] a new instance of Function # - # source://rbs//lib/rbs/types.rb#934 + # source://rbs//lib/rbs/types.rb#971 def initialize(required_positionals:, optional_positionals:, rest_positionals:, trailing_positionals:, required_keywords:, optional_keywords:, rest_keywords:, return_type:); end - # source://rbs//lib/rbs/types.rb#945 + # source://rbs//lib/rbs/types.rb#982 def ==(other); end - # source://rbs//lib/rbs/types.rb#1016 + # source://rbs//lib/rbs/types.rb#1053 def amap(array, &block); end - # source://rbs//lib/rbs/types.rb#1153 + # source://rbs//lib/rbs/types.rb#1192 def drop_head; end - # source://rbs//lib/rbs/types.rb#1170 + # source://rbs//lib/rbs/types.rb#1209 def drop_tail; end - # source://rbs//lib/rbs/types.rb#1053 + # source://rbs//lib/rbs/types.rb#1090 def each_param(&block); end - # source://rbs//lib/rbs/types.rb#1038 + # source://rbs//lib/rbs/types.rb#1075 def each_type; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1124 + # source://rbs//lib/rbs/types.rb#1163 def empty?; end - # source://rbs//lib/rbs/types.rb#945 + # source://rbs//lib/rbs/types.rb#994 def eql?(other); end - # source://rbs//lib/rbs/types.rb#971 + # source://rbs//lib/rbs/types.rb#1008 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1195 + # source://rbs//lib/rbs/types.rb#1234 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1183 + # source://rbs//lib/rbs/types.rb#1222 def has_keyword?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1191 + # source://rbs//lib/rbs/types.rb#1230 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#959 + # source://rbs//lib/rbs/types.rb#996 def hash; end - # source://rbs//lib/rbs/types.rb#1024 + # source://rbs//lib/rbs/types.rb#1061 def hmapv(hash, &block); end - # source://rbs//lib/rbs/types.rb#999 + # source://rbs//lib/rbs/types.rb#1036 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#1032 + # source://rbs//lib/rbs/types.rb#1069 def map_type_name(&block); end # Returns the value of attribute optional_keywords. # - # source://rbs//lib/rbs/types.rb#930 + # source://rbs//lib/rbs/types.rb#967 def optional_keywords; end # Returns the value of attribute optional_positionals. # - # source://rbs//lib/rbs/types.rb#926 + # source://rbs//lib/rbs/types.rb#963 def optional_positionals; end - # source://rbs//lib/rbs/types.rb#1134 + # source://rbs//lib/rbs/types.rb#1173 def param_to_s; end # Returns the value of attribute required_keywords. # - # source://rbs//lib/rbs/types.rb#929 + # source://rbs//lib/rbs/types.rb#966 def required_keywords; end # Returns the value of attribute required_positionals. # - # source://rbs//lib/rbs/types.rb#925 + # source://rbs//lib/rbs/types.rb#962 def required_positionals; end # Returns the value of attribute rest_keywords. # - # source://rbs//lib/rbs/types.rb#931 + # source://rbs//lib/rbs/types.rb#968 def rest_keywords; end # Returns the value of attribute rest_positionals. # - # source://rbs//lib/rbs/types.rb#927 + # source://rbs//lib/rbs/types.rb#964 def rest_positionals; end - # source://rbs//lib/rbs/types.rb#1149 + # source://rbs//lib/rbs/types.rb#1188 def return_to_s; end # Returns the value of attribute return_type. # - # source://rbs//lib/rbs/types.rb#932 + # source://rbs//lib/rbs/types.rb#969 def return_type; end - # source://rbs//lib/rbs/types.rb#1080 + # source://rbs//lib/rbs/types.rb#1117 def sub(s); end - # source://rbs//lib/rbs/types.rb#1067 + # source://rbs//lib/rbs/types.rb#1104 def to_json(state = T.unsafe(nil)); end # Returns the value of attribute trailing_positionals. # - # source://rbs//lib/rbs/types.rb#928 + # source://rbs//lib/rbs/types.rb#965 def trailing_positionals; end - # source://rbs//lib/rbs/types.rb#1110 + # source://rbs//lib/rbs/types.rb#1149 def update(required_positionals: T.unsafe(nil), optional_positionals: T.unsafe(nil), rest_positionals: T.unsafe(nil), trailing_positionals: T.unsafe(nil), required_keywords: T.unsafe(nil), optional_keywords: T.unsafe(nil), rest_keywords: T.unsafe(nil), return_type: T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1199 + # source://rbs//lib/rbs/types.rb#1238 def with_nonreturn_void?; end - # source://rbs//lib/rbs/types.rb#1097 + # source://rbs//lib/rbs/types.rb#1136 def with_return_type(type); end class << self - # source://rbs//lib/rbs/types.rb#1084 + # source://rbs//lib/rbs/types.rb#1123 def empty(return_type); end end end -# source://rbs//lib/rbs/types.rb#879 +# source://rbs//lib/rbs/types.rb#916 class RBS::Types::Function::Param # @return [Param] a new instance of Param # - # source://rbs//lib/rbs/types.rb#884 + # source://rbs//lib/rbs/types.rb#921 def initialize(type:, name:, location: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#890 + # source://rbs//lib/rbs/types.rb#927 def ==(other); end - # source://rbs//lib/rbs/types.rb#890 + # source://rbs//lib/rbs/types.rb#931 def eql?(other); end - # source://rbs//lib/rbs/types.rb#896 + # source://rbs//lib/rbs/types.rb#933 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#882 + # source://rbs//lib/rbs/types.rb#919 def location; end - # source://rbs//lib/rbs/types.rb#900 + # source://rbs//lib/rbs/types.rb#937 def map_type(&block); end # Returns the value of attribute name. # - # source://rbs//lib/rbs/types.rb#881 + # source://rbs//lib/rbs/types.rb#918 def name; end - # source://rbs//lib/rbs/types.rb#908 + # source://rbs//lib/rbs/types.rb#945 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#912 + # source://rbs//lib/rbs/types.rb#949 def to_s; end # Returns the value of attribute type. # - # source://rbs//lib/rbs/types.rb#880 + # source://rbs//lib/rbs/types.rb#917 def type; end end -# source://rbs//lib/rbs/types.rb#310 +# source://rbs//lib/rbs/types.rb#322 class RBS::Types::Interface include ::RBS::Types::Application # @return [Interface] a new instance of Interface # - # source://rbs//lib/rbs/types.rb#315 + # source://rbs//lib/rbs/types.rb#327 def initialize(name:, args:, location:); end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#311 + # source://rbs//lib/rbs/types.rb#323 def location; end - # source://rbs//lib/rbs/types.rb#339 + # source://rbs//lib/rbs/types.rb#353 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#331 + # source://rbs//lib/rbs/types.rb#345 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#325 + # source://rbs//lib/rbs/types.rb#337 def sub(s); end - # source://rbs//lib/rbs/types.rb#321 + # source://rbs//lib/rbs/types.rb#333 def to_json(state = T.unsafe(nil)); end end -# source://rbs//lib/rbs/types.rb#797 +# source://rbs//lib/rbs/types.rb#832 class RBS::Types::Intersection # @return [Intersection] a new instance of Intersection # - # source://rbs//lib/rbs/types.rb#801 + # source://rbs//lib/rbs/types.rb#836 def initialize(types:, location:); end - # source://rbs//lib/rbs/types.rb#806 + # source://rbs//lib/rbs/types.rb#841 def ==(other); end - # source://rbs//lib/rbs/types.rb#842 + # source://rbs//lib/rbs/types.rb#879 def each_type(&block); end - # source://rbs//lib/rbs/types.rb#806 + # source://rbs//lib/rbs/types.rb#845 def eql?(other); end - # source://rbs//lib/rbs/types.rb#816 + # source://rbs//lib/rbs/types.rb#851 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#869 + # source://rbs//lib/rbs/types.rb#906 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#865 + # source://rbs//lib/rbs/types.rb#902 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#812 + # source://rbs//lib/rbs/types.rb#847 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#799 + # source://rbs//lib/rbs/types.rb#834 def location; end - # source://rbs//lib/rbs/types.rb#850 + # source://rbs//lib/rbs/types.rb#887 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#858 + # source://rbs//lib/rbs/types.rb#895 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#828 + # source://rbs//lib/rbs/types.rb#863 def sub(s); end - # source://rbs//lib/rbs/types.rb#824 + # source://rbs//lib/rbs/types.rb#859 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#833 + # source://rbs//lib/rbs/types.rb#870 def to_s(level = T.unsafe(nil)); end # Returns the value of attribute types. # - # source://rbs//lib/rbs/types.rb#798 + # source://rbs//lib/rbs/types.rb#833 def types; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#873 + # source://rbs//lib/rbs/types.rb#910 def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#1483 +# source://rbs//lib/rbs/types.rb#1530 class RBS::Types::Literal include ::RBS::Types::NoFreeVariables include ::RBS::Types::NoSubst @@ -6037,56 +7659,56 @@ class RBS::Types::Literal # @return [Literal] a new instance of Literal # - # source://rbs//lib/rbs/types.rb#1487 + # source://rbs//lib/rbs/types.rb#1534 def initialize(literal:, location:); end - # source://rbs//lib/rbs/types.rb#1492 + # source://rbs//lib/rbs/types.rb#1539 def ==(other); end - # source://rbs//lib/rbs/types.rb#1492 + # source://rbs//lib/rbs/types.rb#1543 def eql?(other); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1519 + # source://rbs//lib/rbs/types.rb#1566 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1515 + # source://rbs//lib/rbs/types.rb#1562 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#1498 + # source://rbs//lib/rbs/types.rb#1545 def hash; end # Returns the value of attribute literal. # - # source://rbs//lib/rbs/types.rb#1484 + # source://rbs//lib/rbs/types.rb#1531 def literal; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#1485 + # source://rbs//lib/rbs/types.rb#1532 def location; end - # source://rbs//lib/rbs/types.rb#1507 + # source://rbs//lib/rbs/types.rb#1554 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1511 + # source://rbs//lib/rbs/types.rb#1558 def to_s(level = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1523 + # source://rbs//lib/rbs/types.rb#1570 def with_nonreturn_void?; end class << self - # source://rbs//lib/rbs/types.rb#1543 + # source://rbs//lib/rbs/types.rb#1590 def unescape_string(string, is_double_quote); end end end -# source://rbs//lib/rbs/types.rb#1527 +# source://rbs//lib/rbs/types.rb#1574 RBS::Types::Literal::TABLE = T.let(T.unsafe(nil), Hash) # source://rbs//lib/rbs/types.rb#5 @@ -6104,524 +7726,524 @@ end # source://rbs//lib/rbs/types.rb#17 module RBS::Types::NoTypeName # source://rbs//lib/rbs/types.rb#18 - def map_type_name; end + def map_type_name(&_arg0); end end -# source://rbs//lib/rbs/types.rb#633 +# source://rbs//lib/rbs/types.rb#655 class RBS::Types::Optional # @return [Optional] a new instance of Optional # - # source://rbs//lib/rbs/types.rb#637 + # source://rbs//lib/rbs/types.rb#659 def initialize(type:, location:); end - # source://rbs//lib/rbs/types.rb#642 + # source://rbs//lib/rbs/types.rb#664 def ==(other); end - # source://rbs//lib/rbs/types.rb#678 + # source://rbs//lib/rbs/types.rb#702 def each_type; end - # source://rbs//lib/rbs/types.rb#642 + # source://rbs//lib/rbs/types.rb#668 def eql?(other); end - # source://rbs//lib/rbs/types.rb#652 + # source://rbs//lib/rbs/types.rb#674 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#708 + # source://rbs//lib/rbs/types.rb#732 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#704 + # source://rbs//lib/rbs/types.rb#728 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#648 + # source://rbs//lib/rbs/types.rb#670 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#635 + # source://rbs//lib/rbs/types.rb#657 def location; end - # source://rbs//lib/rbs/types.rb#693 + # source://rbs//lib/rbs/types.rb#717 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#686 + # source://rbs//lib/rbs/types.rb#710 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#660 + # source://rbs//lib/rbs/types.rb#682 def sub(s); end - # source://rbs//lib/rbs/types.rb#656 + # source://rbs//lib/rbs/types.rb#678 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#664 + # source://rbs//lib/rbs/types.rb#688 def to_s(level = T.unsafe(nil)); end # Returns the value of attribute type. # - # source://rbs//lib/rbs/types.rb#634 + # source://rbs//lib/rbs/types.rb#656 def type; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#712 + # source://rbs//lib/rbs/types.rb#736 def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#1362 +# source://rbs//lib/rbs/types.rb#1407 class RBS::Types::Proc # @return [Proc] a new instance of Proc # - # source://rbs//lib/rbs/types.rb#1368 + # source://rbs//lib/rbs/types.rb#1413 def initialize(location:, type:, block:, self_type: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1375 + # source://rbs//lib/rbs/types.rb#1420 def ==(other); end # Returns the value of attribute block. # - # source://rbs//lib/rbs/types.rb#1364 + # source://rbs//lib/rbs/types.rb#1409 def block; end - # source://rbs//lib/rbs/types.rb#1427 + # source://rbs//lib/rbs/types.rb#1474 def each_type(&block); end - # source://rbs//lib/rbs/types.rb#1375 + # source://rbs//lib/rbs/types.rb#1424 def eql?(other); end - # source://rbs//lib/rbs/types.rb#1385 + # source://rbs//lib/rbs/types.rb#1430 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1466 + # source://rbs//lib/rbs/types.rb#1513 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1462 + # source://rbs//lib/rbs/types.rb#1509 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#1381 + # source://rbs//lib/rbs/types.rb#1426 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#1366 + # source://rbs//lib/rbs/types.rb#1411 def location; end - # source://rbs//lib/rbs/types.rb#1449 + # source://rbs//lib/rbs/types.rb#1496 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#1440 + # source://rbs//lib/rbs/types.rb#1487 def map_type_name(&block); end # Returns the value of attribute self_type. # - # source://rbs//lib/rbs/types.rb#1365 + # source://rbs//lib/rbs/types.rb#1410 def self_type; end - # source://rbs//lib/rbs/types.rb#1402 + # source://rbs//lib/rbs/types.rb#1447 def sub(s); end - # source://rbs//lib/rbs/types.rb#1392 + # source://rbs//lib/rbs/types.rb#1437 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1411 + # source://rbs//lib/rbs/types.rb#1458 def to_s(level = T.unsafe(nil)); end # Returns the value of attribute type. # - # source://rbs//lib/rbs/types.rb#1363 + # source://rbs//lib/rbs/types.rb#1408 def type; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1470 + # source://rbs//lib/rbs/types.rb#1517 def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#517 +# source://rbs//lib/rbs/types.rb#537 class RBS::Types::Record # @return [Record] a new instance of Record # - # source://rbs//lib/rbs/types.rb#521 + # source://rbs//lib/rbs/types.rb#541 def initialize(location:, all_fields: T.unsafe(nil), fields: T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#545 + # source://rbs//lib/rbs/types.rb#565 def ==(other); end # Returns the value of attribute all_fields. # - # source://rbs//lib/rbs/types.rb#518 + # source://rbs//lib/rbs/types.rb#538 def all_fields; end - # source://rbs//lib/rbs/types.rb#593 + # source://rbs//lib/rbs/types.rb#615 def each_type(&block); end - # source://rbs//lib/rbs/types.rb#545 + # source://rbs//lib/rbs/types.rb#569 def eql?(other); end # Returns the value of attribute fields. # - # source://rbs//lib/rbs/types.rb#518 + # source://rbs//lib/rbs/types.rb#538 def fields; end - # source://rbs//lib/rbs/types.rb#555 + # source://rbs//lib/rbs/types.rb#575 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#624 + # source://rbs//lib/rbs/types.rb#646 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#620 + # source://rbs//lib/rbs/types.rb#642 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#551 + # source://rbs//lib/rbs/types.rb#571 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#519 + # source://rbs//lib/rbs/types.rb#539 def location; end - # source://rbs//lib/rbs/types.rb#609 + # source://rbs//lib/rbs/types.rb#631 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#602 + # source://rbs//lib/rbs/types.rb#624 def map_type_name(&block); end # Returns the value of attribute optional_fields. # - # source://rbs//lib/rbs/types.rb#518 + # source://rbs//lib/rbs/types.rb#538 def optional_fields; end - # source://rbs//lib/rbs/types.rb#570 + # source://rbs//lib/rbs/types.rb#590 def sub(s); end - # source://rbs//lib/rbs/types.rb#566 + # source://rbs//lib/rbs/types.rb#586 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#577 + # source://rbs//lib/rbs/types.rb#599 def to_s(level = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#628 + # source://rbs//lib/rbs/types.rb#650 def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#1350 +# source://rbs//lib/rbs/types.rb#1395 module RBS::Types::SelfTypeBindingHelper private - # source://rbs//lib/rbs/types.rb#1353 + # source://rbs//lib/rbs/types.rb#1398 def self_type_binding_to_s(t); end class << self - # source://rbs//lib/rbs/types.rb#1353 + # source://rbs//lib/rbs/types.rb#1398 def self_type_binding_to_s(t); end end end -# source://rbs//lib/rbs/types.rb#434 +# source://rbs//lib/rbs/types.rb#452 class RBS::Types::Tuple # @return [Tuple] a new instance of Tuple # - # source://rbs//lib/rbs/types.rb#438 + # source://rbs//lib/rbs/types.rb#456 def initialize(types:, location:); end - # source://rbs//lib/rbs/types.rb#443 + # source://rbs//lib/rbs/types.rb#461 def ==(other); end - # source://rbs//lib/rbs/types.rb#478 + # source://rbs//lib/rbs/types.rb#498 def each_type(&block); end - # source://rbs//lib/rbs/types.rb#443 + # source://rbs//lib/rbs/types.rb#465 def eql?(other); end - # source://rbs//lib/rbs/types.rb#453 + # source://rbs//lib/rbs/types.rb#471 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#508 + # source://rbs//lib/rbs/types.rb#528 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#504 + # source://rbs//lib/rbs/types.rb#524 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#449 + # source://rbs//lib/rbs/types.rb#467 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#436 + # source://rbs//lib/rbs/types.rb#454 def location; end - # source://rbs//lib/rbs/types.rb#493 + # source://rbs//lib/rbs/types.rb#513 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#486 + # source://rbs//lib/rbs/types.rb#506 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#465 + # source://rbs//lib/rbs/types.rb#483 def sub(s); end - # source://rbs//lib/rbs/types.rb#461 + # source://rbs//lib/rbs/types.rb#479 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#470 + # source://rbs//lib/rbs/types.rb#490 def to_s(level = T.unsafe(nil)); end # Returns the value of attribute types. # - # source://rbs//lib/rbs/types.rb#435 + # source://rbs//lib/rbs/types.rb#453 def types; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#512 + # source://rbs//lib/rbs/types.rb#532 def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#717 +# source://rbs//lib/rbs/types.rb#741 class RBS::Types::Union # @return [Union] a new instance of Union # - # source://rbs//lib/rbs/types.rb#721 + # source://rbs//lib/rbs/types.rb#745 def initialize(types:, location:); end - # source://rbs//lib/rbs/types.rb#726 + # source://rbs//lib/rbs/types.rb#750 def ==(other); end - # source://rbs//lib/rbs/types.rb#761 + # source://rbs//lib/rbs/types.rb#796 def each_type(&block); end - # source://rbs//lib/rbs/types.rb#726 + # source://rbs//lib/rbs/types.rb#754 def eql?(other); end - # source://rbs//lib/rbs/types.rb#736 + # source://rbs//lib/rbs/types.rb#760 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#788 + # source://rbs//lib/rbs/types.rb#823 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#784 + # source://rbs//lib/rbs/types.rb#819 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#732 + # source://rbs//lib/rbs/types.rb#756 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#719 + # source://rbs//lib/rbs/types.rb#743 def location; end - # source://rbs//lib/rbs/types.rb#769 + # source://rbs//lib/rbs/types.rb#804 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#777 + # source://rbs//lib/rbs/types.rb#812 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#748 + # source://rbs//lib/rbs/types.rb#772 def sub(s); end - # source://rbs//lib/rbs/types.rb#744 + # source://rbs//lib/rbs/types.rb#768 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#753 + # source://rbs//lib/rbs/types.rb#779 def to_s(level = T.unsafe(nil)); end # Returns the value of attribute types. # - # source://rbs//lib/rbs/types.rb#718 + # source://rbs//lib/rbs/types.rb#742 def types; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#792 + # source://rbs//lib/rbs/types.rb#827 def with_nonreturn_void?; end end -# source://rbs//lib/rbs/types.rb#1212 +# source://rbs//lib/rbs/types.rb#1251 class RBS::Types::UntypedFunction # @return [UntypedFunction] a new instance of UntypedFunction # - # source://rbs//lib/rbs/types.rb#1215 + # source://rbs//lib/rbs/types.rb#1254 def initialize(return_type:); end - # source://rbs//lib/rbs/types.rb#1295 + # source://rbs//lib/rbs/types.rb#1336 def ==(other); end - # source://rbs//lib/rbs/types.rb#1245 + # source://rbs//lib/rbs/types.rb#1284 def each_param(&block); end - # source://rbs//lib/rbs/types.rb#1237 + # source://rbs//lib/rbs/types.rb#1276 def each_type(&block); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1271 + # source://rbs//lib/rbs/types.rb#1312 def empty?; end - # source://rbs//lib/rbs/types.rb#1295 + # source://rbs//lib/rbs/types.rb#1340 def eql?(other); end - # source://rbs//lib/rbs/types.rb#1219 + # source://rbs//lib/rbs/types.rb#1258 def free_variables(acc = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1279 + # source://rbs//lib/rbs/types.rb#1320 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1275 + # source://rbs//lib/rbs/types.rb#1316 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#1301 + # source://rbs//lib/rbs/types.rb#1342 def hash; end - # source://rbs//lib/rbs/types.rb#1223 + # source://rbs//lib/rbs/types.rb#1262 def map_type(&block); end - # source://rbs//lib/rbs/types.rb#1231 + # source://rbs//lib/rbs/types.rb#1270 def map_type_name(&block); end - # source://rbs//lib/rbs/types.rb#1287 + # source://rbs//lib/rbs/types.rb#1328 def param_to_s; end - # source://rbs//lib/rbs/types.rb#1291 + # source://rbs//lib/rbs/types.rb#1332 def return_to_s; end # Returns the value of attribute return_type. # - # source://rbs//lib/rbs/types.rb#1213 + # source://rbs//lib/rbs/types.rb#1252 def return_type; end - # source://rbs//lib/rbs/types.rb#1259 + # source://rbs//lib/rbs/types.rb#1298 def sub(subst); end - # source://rbs//lib/rbs/types.rb#1253 + # source://rbs//lib/rbs/types.rb#1292 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#1267 + # source://rbs//lib/rbs/types.rb#1308 def update(return_type: T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#1283 + # source://rbs//lib/rbs/types.rb#1324 def with_nonreturn_void?; end - # source://rbs//lib/rbs/types.rb#1263 + # source://rbs//lib/rbs/types.rb#1304 def with_return_type(ty); end end -# source://rbs//lib/rbs/types.rb#131 +# source://rbs//lib/rbs/types.rb#133 class RBS::Types::Variable include ::RBS::Types::NoTypeName include ::RBS::Types::EmptyEachType # @return [Variable] a new instance of Variable # - # source://rbs//lib/rbs/types.rb#137 + # source://rbs//lib/rbs/types.rb#139 def initialize(name:, location:); end - # source://rbs//lib/rbs/types.rb#142 + # source://rbs//lib/rbs/types.rb#144 def ==(other); end - # source://rbs//lib/rbs/types.rb#142 + # source://rbs//lib/rbs/types.rb#148 def eql?(other); end - # source://rbs//lib/rbs/types.rb#152 + # source://rbs//lib/rbs/types.rb#154 def free_variables(set = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#191 + # source://rbs//lib/rbs/types.rb#193 def has_classish_type?; end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#187 + # source://rbs//lib/rbs/types.rb#189 def has_self_type?; end - # source://rbs//lib/rbs/types.rb#148 + # source://rbs//lib/rbs/types.rb#150 def hash; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/types.rb#133 + # source://rbs//lib/rbs/types.rb#135 def location; end # Returns the value of attribute name. # - # source://rbs//lib/rbs/types.rb#132 + # source://rbs//lib/rbs/types.rb#134 def name; end - # source://rbs//lib/rbs/types.rb#162 + # source://rbs//lib/rbs/types.rb#164 def sub(s); end - # source://rbs//lib/rbs/types.rb#158 + # source://rbs//lib/rbs/types.rb#160 def to_json(state = T.unsafe(nil)); end - # source://rbs//lib/rbs/types.rb#181 + # source://rbs//lib/rbs/types.rb#183 def to_s(level = T.unsafe(nil)); end # @return [Boolean] # - # source://rbs//lib/rbs/types.rb#195 + # source://rbs//lib/rbs/types.rb#197 def with_nonreturn_void?; end class << self - # source://rbs//lib/rbs/types.rb#166 + # source://rbs//lib/rbs/types.rb#168 def build(v); end - # source://rbs//lib/rbs/types.rb#176 + # source://rbs//lib/rbs/types.rb#178 def fresh(v = T.unsafe(nil)); end end end -# source://rbs//lib/rbs/errors.rb#325 +# source://rbs//lib/rbs/errors.rb#349 class RBS::UnknownMethodAliasError < ::RBS::DefinitionError include ::RBS::DetailedMessageable # @return [UnknownMethodAliasError] a new instance of UnknownMethodAliasError # - # source://rbs//lib/rbs/errors.rb#333 + # source://rbs//lib/rbs/errors.rb#357 def initialize(type_name:, original_name:, aliased_name:, location:); end # Returns the value of attribute aliased_name. # - # source://rbs//lib/rbs/errors.rb#330 + # source://rbs//lib/rbs/errors.rb#354 def aliased_name; end # Returns the value of attribute location. # - # source://rbs//lib/rbs/errors.rb#331 + # source://rbs//lib/rbs/errors.rb#355 def location; end # Returns the value of attribute original_name. # - # source://rbs//lib/rbs/errors.rb#329 + # source://rbs//lib/rbs/errors.rb#353 def original_name; end # Returns the value of attribute type_name. # - # source://rbs//lib/rbs/errors.rb#328 + # source://rbs//lib/rbs/errors.rb#352 def type_name; end end @@ -6653,13 +8275,13 @@ class RBS::Validator # source://rbs//lib/rbs/validator.rb#6 def resolver; end - # source://rbs//lib/rbs/validator.rb#174 + # source://rbs//lib/rbs/validator.rb#178 def type_alias_dependency; end - # source://rbs//lib/rbs/validator.rb#178 + # source://rbs//lib/rbs/validator.rb#182 def type_alias_regularity; end - # source://rbs//lib/rbs/validator.rb#154 + # source://rbs//lib/rbs/validator.rb#158 def validate_class_alias(entry:); end # source://rbs//lib/rbs/validator.rb#104 @@ -6675,6 +8297,34 @@ class RBS::Validator # source://rbs//lib/rbs/validator.rb#120 def validate_type_params(params, type_name:, location:, method_name: T.unsafe(nil)); end + + # source://rbs//lib/rbs/validator.rb#154 + def validate_variable(var); end +end + +# source://rbs//lib/rbs/errors.rb#325 +class RBS::VariableDuplicationError < ::RBS::DefinitionError + include ::RBS::DetailedMessageable + + # @return [VariableDuplicationError] a new instance of VariableDuplicationError + # + # source://rbs//lib/rbs/errors.rb#332 + def initialize(type_name:, variable_name:, location:); end + + # Returns the value of attribute location. + # + # source://rbs//lib/rbs/errors.rb#330 + def location; end + + # Returns the value of attribute type_name. + # + # source://rbs//lib/rbs/errors.rb#328 + def type_name; end + + # Returns the value of attribute variable_name. + # + # source://rbs//lib/rbs/errors.rb#329 + def variable_name; end end # source://rbs//lib/rbs/variance_calculator.rb#4 @@ -6778,21 +8428,6 @@ class RBS::Vendorer def vendor_dir; end end -# source://rbs//lib/rbs/errors.rb#569 -class RBS::WillSyntaxError < ::RBS::DefinitionError - include ::RBS::DetailedMessageable - - # @return [WillSyntaxError] a new instance of WillSyntaxError - # - # source://rbs//lib/rbs/errors.rb#574 - def initialize(message, location:); end - - # Returns the value of attribute location. - # - # source://rbs//lib/rbs/errors.rb#572 - def location; end -end - # source://rbs//lib/rbs/writer.rb#4 class RBS::Writer # @return [Writer] a new instance of Writer @@ -6800,7 +8435,7 @@ class RBS::Writer # source://rbs//lib/rbs/writer.rb#8 def initialize(out:); end - # source://rbs//lib/rbs/writer.rb#361 + # source://rbs//lib/rbs/writer.rb#366 def attribute(kind, attr); end # source://rbs//lib/rbs/writer.rb#42 @@ -6814,13 +8449,13 @@ class RBS::Writer # source://rbs//lib/rbs/writer.rb#6 def indentation; end - # source://rbs//lib/rbs/writer.rb#288 + # source://rbs//lib/rbs/writer.rb#293 def method_name(name); end - # source://rbs//lib/rbs/writer.rb#214 + # source://rbs//lib/rbs/writer.rb#219 def name_and_args(name, args); end - # source://rbs//lib/rbs/writer.rb#202 + # source://rbs//lib/rbs/writer.rb#207 def name_and_params(name, params); end # Returns the value of attribute out. @@ -6839,10 +8474,10 @@ class RBS::Writer # source://rbs//lib/rbs/writer.rb#14 def preserve?; end - # source://rbs//lib/rbs/writer.rb#391 + # source://rbs//lib/rbs/writer.rb#396 def preserve_empty_line(prev, decl); end - # source://rbs//lib/rbs/writer.rb#224 + # source://rbs//lib/rbs/writer.rb#229 def put_lines(lines, leading_spaces:); end # source://rbs//lib/rbs/writer.rb#34 @@ -6857,24 +8492,18 @@ class RBS::Writer # source://rbs//lib/rbs/writer.rb#66 def write_comment(comment); end - # source://rbs//lib/rbs/writer.rb#114 + # source://rbs//lib/rbs/writer.rb#119 def write_decl(decl); end - # source://rbs//lib/rbs/writer.rb#309 + # source://rbs//lib/rbs/writer.rb#314 def write_def(member); end - # source://rbs//lib/rbs/writer.rb#97 - def write_directive(dir); end - - # source://rbs//lib/rbs/writer.rb#301 + # source://rbs//lib/rbs/writer.rb#306 def write_loc_source(located); end - # source://rbs//lib/rbs/writer.rb#234 + # source://rbs//lib/rbs/writer.rb#239 def write_member(member); end -end -# source://rbs//lib/rdoc/discover.rb#8 -class RDoc::Parser::RBS < ::RDoc::Parser - # source://rbs//lib/rdoc/discover.rb#10 - def scan; end + # source://rbs//lib/rbs/writer.rb#102 + def write_use_directive(dir); end end diff --git a/test/rbi/rbs/method_type_translator_test.rb b/test/rbi/rbs/method_type_translator_test.rb index 0bfcdec1..cba0a1fa 100644 --- a/test/rbi/rbs/method_type_translator_test.rb +++ b/test/rbi/rbs/method_type_translator_test.rb @@ -187,14 +187,12 @@ def test_translate_type_params end def test_translate_generic_singleton - e = assert_raises(::RBS::ParsingError) do - translate( - "-> singleton(Foo)[Bar]", - Method.new("foo"), - ) - end + sig = translate( + "-> singleton(Foo)[Bar]", + Method.new("foo"), + ) - assert_equal("a.rbs:1:17...1:18: Syntax error: expected a token `pEOF`, token=`[` (pLBRACKET)", e.message) + assert_equal(Type.class_of(Type.simple("Foo"), Type.simple("Bar")), sig.return_type) end private diff --git a/test/rbi/rbs/type_translator_test.rb b/test/rbi/rbs/type_translator_test.rb index d49b07b1..e25ba615 100644 --- a/test/rbi/rbs/type_translator_test.rb +++ b/test/rbi/rbs/type_translator_test.rb @@ -91,11 +91,7 @@ def test_translate_class_singleton assert_equal(Type.class_of(Type.simple("Foo")), translate("singleton(Foo)")) assert_equal(Type.class_of(Type.simple("Foo::Bar")), translate("singleton(Foo::Bar)")) assert_equal(Type.class_of(Type.simple("::Foo::Bar")), translate("singleton(::Foo::Bar)")) - - e = assert_raises(::RBS::ParsingError) do - translate("singleton(Foo)[Bar]") - end - assert_equal("a.rbs:1:14...1:15: Syntax error: expected a token `pEOF`, token=`[` (pLBRACKET)", e.message) + assert_equal(Type.class_of(Type.simple("Foo"), Type.simple("Bar")), translate("singleton(Foo)[Bar]")) end def test_translate_interface diff --git a/test/rbi/rbs_printer_test.rb b/test/rbi/rbs_printer_test.rb index b90344f0..477334b8 100644 --- a/test/rbi/rbs_printer_test.rb +++ b/test/rbi/rbs_printer_test.rb @@ -686,6 +686,9 @@ def d; end sig { returns(T::Class[T.untyped]) } def e; end + + sig { returns(T.class_of(Foo)[Bar]) } + def f; end RBI assert_equal(<<~RBI, rbi.rbs_string) @@ -698,6 +701,8 @@ def c: -> Class def d: -> Class[top] def e: -> Class[untyped] + + def f: -> singleton(Foo)[Bar] RBI end diff --git a/test/rbi/rewriters/translate_rbs_sigs_test.rb b/test/rbi/rewriters/translate_rbs_sigs_test.rb index 3fb68ed2..83265233 100644 --- a/test/rbi/rewriters/translate_rbs_sigs_test.rb +++ b/test/rbi/rewriters/translate_rbs_sigs_test.rb @@ -93,14 +93,13 @@ def foo(a); end end def test_translate_generic_singleton - e = assert_raises(::RBS::ParsingError) do - rewrite(<<~RBI) - #: -> singleton(Foo)[Bar] - def foo; end - RBI - end - - assert_equal("a.rbs:1:17...1:18: Syntax error: expected a token `pEOF`, token=`[` (pLBRACKET)", e.message) + assert_equal(<<~RBI, rewrite(<<~RBI2)) + sig { returns(::T.class_of(Foo)[Bar]) } + def foo; end + RBI + #: -> singleton(Foo)[Bar] + def foo; end + RBI2 end private