-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is important to always be able to infer the return type of `error` as `Union{}`, but there's a hitch when a package globally sets `@max_methods 1` and it causes inference for `error(::Any)` to fail (#54029). To address this, this commit sets `@max_methods 2 function error end` at the definition of `error`. This overrides any global `@max_methods 1` settings on package side, guaranteeing that return type inference on `error` is successful always.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters