sorbet-runtime 0.4.4361 → 0.4.4362

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
  SHA1:
3
- metadata.gz: 05e71cdbf6a346f6b83b25695e471b0530a638f3
4
- data.tar.gz: df7b2254641f1ce3d748fff36d0e7e525c7770fb
3
+ metadata.gz: 83a3d65a2902eb4d43f12d037a3ace849d3a2ff1
4
+ data.tar.gz: b873428cd637d7f053992d3b9c6f1611dfcd9885
5
5
  SHA512:
6
- metadata.gz: 9d4b7dfab5359aa0e7595030bcc8179a46b5b2deaaedfb111c26a026118c8d62b03aded0872e60dee83db339598f521a176b979a3556f473466f2ee90449b767
7
- data.tar.gz: 8fe453528019faeb30a8716c35539211ae7fb4769210ab985f268314fc9fc4ab8a49aa6a182638fee6f7151622c6104a94b508c88283ae6f19826a6d8316865c
6
+ metadata.gz: aed781e38d9773f591c0459f402142b3dfa916594dc1fcda93edfac13b973e3292b6a9ed1e349c735c2ea7d381fb1afc0621085418ed1e28418e8a46bcdcaa51
7
+ data.tar.gz: 8290154bb333c23ebc8f621907c94f21a685d642f3a3db00d07d83454038df0022416330f2158344e66705c8cca301260402aa122738bad86740e0ca492344f6
@@ -85,8 +85,8 @@ module T::Private::Methods
85
85
  if !decl.checked.equal?(ARG_NOT_PROVIDED)
86
86
  raise BuilderError.new("You can't call .checked multiple times in a signature.")
87
87
  end
88
- if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
89
- raise BuilderError.new("You can't use .checked with .on_failure.")
88
+ if level == :never && !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
89
+ raise BuilderError.new("You can't use .checked(:never) with .on_failure because .on_failure will have no effect.")
90
90
  end
91
91
  if !decl.generated.equal?(ARG_NOT_PROVIDED)
92
92
  raise BuilderError.new("You can't use .checked with .generated.")
@@ -106,8 +106,8 @@ module T::Private::Methods
106
106
  if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
107
107
  raise BuilderError.new("You can't call .on_failure multiple times in a signature.")
108
108
  end
109
- if !decl.checked.equal?(ARG_NOT_PROVIDED)
110
- raise BuilderError.new("You can't use .on_failure with .checked.")
109
+ if decl.checked == :never
110
+ raise BuilderError.new("You can't use .on_failure with .checked(:never) because .on_failure will have no effect.")
111
111
  end
112
112
  if !decl.generated.equal?(ARG_NOT_PROVIDED)
113
113
  raise BuilderError.new("You can't use .on_failure with .generated.")
@@ -243,7 +243,11 @@ module T::Private::Methods
243
243
  decl.bind = nil
244
244
  end
245
245
  if decl.checked.equal?(ARG_NOT_PROVIDED)
246
- decl.checked = T::Private::RuntimeLevels.default_checked_level
246
+ default_checked_level = T::Private::RuntimeLevels.default_checked_level
247
+ if default_checked_level == :never && !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
248
+ raise BuilderError.new("To use .on_failure you must additionally call .checked(:tests) or .checked(:always), otherwise, the .on_failure has no effect.")
249
+ end
250
+ decl.checked = default_checked_level
247
251
  end
248
252
  if decl.soft_notify.equal?(ARG_NOT_PROVIDED)
249
253
  decl.soft_notify = nil
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.4.4361
4
+ version: 0.4.4362
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe