https://github.com/JuliaLang/julia
Revision dfbcc45f254b1604395b4e28a3bf12696e90ccea authored by Shuhei Kadowaki on 16 May 2023, 02:10:13 UTC, committed by GitHub on 16 May 2023, 02:10:13 UTC
This would help inference on `Core.Compiler.return_type(isequal, tt)`
when `tt` is not well inferred (e.g. `tt` is inferred to `Tuple{Any,Any}`).
(although JuliaLang/julia#46810 may disable this `Core.Compiler.return_type`
improvement for good reasons).

Anyway, it is explicitly stated in the documentation that the `isequal`
method should always return a value of `Bool`. So, not only does this
annotation assist inference, it also serves to ensure the correctness of
our code base, and therefore should be beneficial. We may need to take
similar measures for `isless` and `isgreater` (in separate PRs).
1 parent 909c57f
History
Tip revision: dfbcc45f254b1604395b4e28a3bf12696e90ccea authored by Shuhei Kadowaki on 16 May 2023, 02:10:13 UTC
ensure all `isequal` methods to be inferred to return `Bool` (#49800)
Tip revision: dfbcc45
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 514 bytes
.mailmap -rw-r--r-- 12.1 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.1 KB
HISTORY.md -rw-r--r-- 363.4 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 54.5 KB
Makefile -rw-r--r-- 29.8 KB
NEWS.md -rw-r--r-- 5.1 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.8 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 35.8 KB
pkgimage.mk -rw-r--r-- 5.8 KB
sysimage.mk -rw-r--r-- 4.2 KB

README.md

back to top