Skip to content

Commit 2d5c1a3

Browse files
committed
Fix for type checker
1 parent 5149124 commit 2d5c1a3

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

lib/rbs/definition_builder/method_builder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module RBS
44
class DefinitionBuilder
55
class MethodBuilder
66
class Methods
7-
Definition = _ = Struct.new(:name, :type, :originals, :overloads, :accessibilities, keyword_init: true) do
7+
class Definition < Struct.new(:name, :type, :originals, :overloads, :accessibilities, keyword_init: true)
88
# @implements Definition
99

1010
def original

lib/rbs/environment_loader.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ def initialize(lib:)
1414

1515
include FileFinder
1616

17-
Library = _ = Struct.new(:name, :version, keyword_init: true)
17+
class Library < Struct.new(:name, :version, keyword_init: true)
18+
end
1819

1920
attr_reader :core_root
2021
attr_reader :repository

lib/rbs/prototype/rb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Prototype
55
class RB
66
include Helpers
77

8-
Context = _ = Struct.new(:module_function, :singleton, :namespace, :in_def, keyword_init: true) do
8+
class Context < Struct.new(:module_function, :singleton, :namespace, :in_def, keyword_init: true)
99
# @implements Context
1010

1111
def self.initial(namespace: Namespace.root)

sig/environment_loader.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module RBS
3030
def initialize: (lib: Library) -> void
3131
end
3232

33-
class Library < Struct[String | String?]
33+
class Library
3434
attr_reader name: String
3535
attr_reader version: String?
3636

sig/errors.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,6 @@ module RBS
363363

364364
def initialize: (String message, location: Location[untyped, untyped]?) -> void
365365

366-
def location: () -> Location[untyped, untyped]?
366+
attr_reader location: Location[untyped, untyped]?
367367
end
368368
end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy