https://github.com/JuliaLang/julia
Revision 0f902bf2f7ea6dcf0955b5dc37f00a2c1447af28 authored by Eric Hanson on 03 March 2024, 03:14:06 UTC, committed by GitHub on 03 March 2024, 03:14:06 UTC
We can detect this since we set the `usingfailed` bit when the clash
occurs (to avoid printing the `WARNING` multiple times). In this case,
typos or missing imports (the current message) isn't quite as clear as
it could be, because in fact the name is probably spelled totally right,
it's just that there is a missing explicit import or the name should be
qualified.

This code will stop working if we change the flags in `Core.Binding`,
but the test I added should catch that. However if REPL is supposed to
be independent of Base and not depend on internals there, there could be
an issue. In that case we should probably add an API to Base to inspect
this `usingfailed` bit so we can use it in the REPL.

---------

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Co-authored-by: Alex Arslan <ararslan@comcast.net>
1 parent e7734ea
History
Tip revision: 0f902bf2f7ea6dcf0955b5dc37f00a2c1447af28 authored by Eric Hanson on 03 March 2024, 03:14:06 UTC
Provide better error hint when `UndefVarError` results from name clashes (#53469)
Tip revision: 0f902bf
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-- 571 bytes
.mailmap -rw-r--r-- 12.7 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 1012 bytes
CONTRIBUTING.md -rw-r--r-- 23.4 KB
HISTORY.md -rw-r--r-- 388.1 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 56.1 KB
Makefile -rw-r--r-- 30.2 KB
NEWS.md -rw-r--r-- 2.2 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.9 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 37.8 KB
pkgimage.mk -rw-r--r-- 7.1 KB
sysimage.mk -rw-r--r-- 4.2 KB
typos.toml -rw-r--r-- 78 bytes

README.md

back to top