-
-
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.
improve constraint propagation with multiple || (#39618)
- Loading branch information
1 parent
2916959
commit e4b9fd9
Showing
3 changed files
with
39 additions
and
28 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2994,3 +2994,11 @@ end | |
# issue #40804 | ||
@test Base.return_types(()) do; ===(); end == Any[Union{}] | ||
@test Base.return_types(()) do; typeassert(); end == Any[Union{}] | ||
|
||
# issue #39611 | ||
Base.return_types((Union{Int,Nothing},)) do x | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
simeonschaub
Author
Member
|
||
if x === nothing || x < 0 | ||
return 0 | ||
end | ||
x | ||
end == [Int] |
Is a
@test
needed here? (I just happened to notice this whilst looking at the changes in 1.6.3)