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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41297d1e5bea141931d127caac32d05555b0f8776f6439d3f7a22ebc3e5adcae
4
- data.tar.gz: 9a8b2ced72f5d6878355e48511bbfad8d2beb6242a5c8d2092d3ab6a79286dd2
3
+ metadata.gz: eba060f9b7c385ed33f402d9d286ecef808806829a96c3fb48a8b9940778f044
4
+ data.tar.gz: ffdf68e0a3e45d26c05dca18914eb3d3a45f66311eff018ad05347f32a33ebb6
5
5
  SHA512:
6
- metadata.gz: 6dafe8159c9fc71bbd5ef2f3abcd967a6e721958d72ffdcf29705953e86780382317fa39465c854682718233c856a64df0e1b7dc48c1f15f7262e732c8f5fd35
7
- data.tar.gz: f919eb31e746c0ec1730dbb6812d5463e09cbc4001ea20b50207f8ab555bdd9aaf86a402349cd1fe2f614bcd1c00619c359874764b292d4994a04ab6f3d5a355
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
- if !signature.return_type.subtype_of?(super_signature.return_type)
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.11164
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: 2023-12-23 00:00:00.000000000 Z
11
+ date: 2024-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest