livecheck: compare actual version for casks#10348
livecheck: compare actual version for casks#10348SeekingMeaning merged 1 commit intoHomebrew:masterfrom
Conversation
|
Review period will end on 2021-01-19 at 00:00:00 UTC. |
| when Cask::Cask | ||
| cask_name(formula_or_cask, full_name: full_name) | ||
| else | ||
| T.absurd(formula_or_cask) |
There was a problem hiding this comment.
If we ever change the type of formula_or_cask from
T.any(Formula, Cask::Cask)
to say,
T.any(Formula, Cask::Cask, Thing)
then Sorbet will give an error since we don't handle the case for when formula_or_cask is a Thing
(Admittedly, this is a bit redundant since the name formula_or_cask itself implies that it can only be a Formula or Cask)
Related: https://sorbet.org/docs/exhaustiveness
T.absurd(...)is implemented both statically and at runtime. Statically Sorbet will report an error, and at runtime Sorbet will raise an exception.
There was a problem hiding this comment.
Should I delete?
There was a problem hiding this comment.
I don't feel strongly either way, up to you! Thanks for explaining ❤️
|
Review period ended. |
brew stylewith your changes locally?brew typecheckwith your changes locally?brew testswith your changes locally?brew manlocally and committed any changes?Tested with Homebrew/homebrew-cask#98130
Before:
After: