Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't prompt field names for tuples at the REPL #46897

Merged
merged 2 commits into from
Sep 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/REPL/src/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function complete_symbol(sym::String, @nospecialize(ffunc), context_module::Modu
t = typeof(t.parameters[1])
end
# Only look for fields if this is a concrete type
if isconcretetype(t)
if isconcretetype(t) && !(t <: Tuple)
fields = fieldnames(t)
for field in fields
s = string(field)
Expand Down
6 changes: 6 additions & 0 deletions stdlib/REPL/test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@ let
@test isempty(c)
end

# issue 46800: (3,2).<TAB> errors in the REPL
let
c, r = test_complete("(3,2).")
@test isempty(c)
end

# inexistent completion inside a string
@test_nocompletion("Base.print(\"lol")

Expand Down