sorbet-runtime 0.6.13632 → 0.6.13635
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eefe1ddc8c9547b0d83f954f99257f317b083a54aeaf51bc36e7aa26b2f35f74
|
|
4
|
+
data.tar.gz: fb88d8b6d8d544c49d1a6c505f4d914e3397eb8589da9e7b45990c1d99867f4e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2b0fe69b707100a6daaeb2dee86598436f38fcc2d78f373acee688adacbbe4a007ecacb7facb2cec61c1007557d6435700e580c1d3534c9857b4ac5e7734323
|
|
7
|
+
data.tar.gz: e43447bc650100a300abfaf2f846ba8347b209d61174023c87a5335f37d5d6c107d3d59b7d71da44b976818e4cabf6d4744689ba047311fa11b084d3c434a650
|
|
@@ -232,7 +232,9 @@ module T::Private::Methods::SignatureValidation
|
|
|
232
232
|
end
|
|
233
233
|
end
|
|
234
234
|
|
|
235
|
-
|
|
235
|
+
# block_type is set exactly when the method declares a block param, and
|
|
236
|
+
# unlike block_name, reading it doesn't rebuild `method.parameters`.
|
|
237
|
+
if !super_signature.block_type.nil? && signature.block_type.nil?
|
|
236
238
|
raise "Your definition of `#{method_name}` must accept a block parameter to be compatible " \
|
|
237
239
|
"with the method it #{mode_verb}: " \
|
|
238
240
|
"#{base_override_loc_str(signature, super_signature)}"
|
|
@@ -10,12 +10,15 @@ class T::Private::Types::SimplePairUnion < T::Types::Union
|
|
|
10
10
|
# @param type_a [T::Types::Simple]
|
|
11
11
|
# @param type_b [T::Types::Simple]
|
|
12
12
|
def initialize(type_a, type_b)
|
|
13
|
+
@raw_a = type_a.raw_type
|
|
14
|
+
@raw_b = type_b.raw_type
|
|
15
|
+
|
|
16
|
+
# Only raise after setting every field. `union_of_types` rescues this and
|
|
17
|
+
# drops the object, but `ObjectSpace.each_object` still yields it until the
|
|
18
|
+
# next GC, and `T::Utils.build_all_types` must be able to build it.
|
|
13
19
|
if type_a == type_b
|
|
14
20
|
raise DuplicateType.new("#{type_a} == #{type_b}")
|
|
15
21
|
end
|
|
16
|
-
|
|
17
|
-
@raw_a = type_a.raw_type
|
|
18
|
-
@raw_b = type_b.raw_type
|
|
19
22
|
end
|
|
20
23
|
|
|
21
24
|
# @override Union
|
data/lib/types/types/enum.rb
CHANGED
|
@@ -16,6 +16,12 @@ module T::Types
|
|
|
16
16
|
else
|
|
17
17
|
values.to_set
|
|
18
18
|
end
|
|
19
|
+
rescue StandardError
|
|
20
|
+
# The conversion can raise. A caller can rescue that and drop this
|
|
21
|
+
# object, but `ObjectSpace.each_object` still yields it until the next
|
|
22
|
+
# GC, and `T::Utils.build_all_types` must be able to build it.
|
|
23
|
+
@values = Set[]
|
|
24
|
+
raise
|
|
19
25
|
end
|
|
20
26
|
|
|
21
27
|
def build_type
|