sorbet-runtime 0.6.13373 → 0.6.13385

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: 691ef36ba11f93a657a7a60367f2918fba1c87e83d8f29d00a9753206847b07c
4
- data.tar.gz: 6f9f13b4aca3e5a8d6be8ce41b50515a1102d3bf4010c89b2768faede6bdfaaa
3
+ metadata.gz: 0aacbc65290ea00436b377b9a9ae5a6119eb7565103690f3ca48dc5367af409b
4
+ data.tar.gz: a557477677d13ba37a1ec5e2ca923d844fadaf5414761d6fffcf49a5afebd1eb
5
5
  SHA512:
6
- metadata.gz: d71cfe15dc571089128c1af66f5c70244018760a24b2f0ef42d2d333d80a03f55eafb6d9000b233c6c3644d2b7c25b8c29fb2c9acf67d46e7bf17597bd04d383
7
- data.tar.gz: cf4bfd7b7f6f8e5552bff3b5eb9bc99eccfaa8afb728b73ab2f62f21991c86628def1ba20efe6b09126d5bdcdc50456d0f7426fce48a991fd73b711dadf6763c
6
+ metadata.gz: 73a78a106b7d7620d5731266b11e44c68376bfb7d93f3f20aa650fb78a915b484070864d03ef0d8ff858d15e36fbb5057764bc51121219033d09f4854874c9d4
7
+ data.tar.gz: 6df95518c869b5c12a0f7ac873be2b38359f249a03dbc68020d20199f104d55055df9dc9c1bb51e83165dd3bf241f504362b46fdddd6b100632c2bea0e4a9a96
@@ -256,16 +256,23 @@ module T::Private::Methods::SignatureValidation
256
256
  #
257
257
  # An index loop avoids allocating a pair array per positional arg.
258
258
  # Iterating to super's length is deliberate: extra override positionals
259
- # go unchecked, and when the override has a rest param and fewer named
260
- # args than the base, the missing positions are checked as nil name/type.
259
+ # go unchecked, and when the override folds the remaining base positionals
260
+ # into a rest param, each is checked against the rest param's type
261
+ # (validate_override_shape guarantees such a rest param exists here).
261
262
  super_arg_types = super_signature.arg_types
262
263
  arg_types = signature.arg_types
264
+ rest_type = signature.rest_type
263
265
  index = 0
264
266
  while index < super_arg_types.length
265
267
  super_type = super_arg_types.fetch(index)[1]
266
268
  pair = arg_types[index]
267
- name = pair && pair[0]
268
- type = pair && pair[1]
269
+ if pair
270
+ name = pair[0]
271
+ type = pair[1]
272
+ else
273
+ name = signature.rest_name
274
+ type = rest_type
275
+ end
269
276
  if !super_type.subtype_of?(type)
270
277
  raise "Incompatible type for arg ##{index + 1} (`#{name}`) in signature for #{mode_noun} of method " \
271
278
  "`#{signature.method_name}`:\n" \
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.13373
4
+ version: 0.6.13385
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe