sorbet-runtime 0.5.11164 → 0.5.11170
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 +4 -4
- data/lib/types/private/methods/signature_validation.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eba060f9b7c385ed33f402d9d286ecef808806829a96c3fb48a8b9940778f044
|
|
4
|
+
data.tar.gz: ffdf68e0a3e45d26c05dca18914eb3d3a45f66311eff018ad05347f32a33ebb6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3f002fa0707048b8f3a6b7263c1682aeea29aa6f1501e57b26e59fceb6e54fa2b943d54026c25d56847f739cbf5662625ce8d5eb14802b45f1978f3886f23d0
|
|
7
|
+
data.tar.gz: 1e28fc2f1a65dc7119ea7b1b3f4999cca5c6a7cdf4d2ea0e48f904292b959bbf60dd8bfd94235fe59fc737c430f5b1957536b4c8659d3fb4bfb6ccfb66a17732
|
|
@@ -262,7 +262,14 @@ module T::Private::Methods::SignatureValidation
|
|
|
262
262
|
end
|
|
263
263
|
|
|
264
264
|
# return types must be covariant
|
|
265
|
-
|
|
265
|
+
super_signature_return_type = super_signature.return_type
|
|
266
|
+
|
|
267
|
+
if super_signature_return_type == T::Private::Types::Void::Private::INSTANCE
|
|
268
|
+
# Treat `.void` as `T.anything` (see corresponding comment in definition_valitor for more)
|
|
269
|
+
super_signature_return_type = T::Types::Anything::Private::INSTANCE
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
if !signature.return_type.subtype_of?(super_signature_return_type)
|
|
266
273
|
raise "Incompatible return type in signature for #{mode_noun} of method `#{signature.method_name}`:\n" \
|
|
267
274
|
"* Base: `#{super_signature.return_type}` (in #{method_loc_str(super_signature.method)})\n" \
|
|
268
275
|
"* #{mode_noun.capitalize}: `#{signature.return_type}` (in #{method_loc_str(signature.method)})\n" \
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sorbet-runtime
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.11170
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stripe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2024-01-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|