diff --git a/base/show.jl b/base/show.jl index 870b2f47fe4a6..737303551c917 100644 --- a/base/show.jl +++ b/base/show.jl @@ -1779,10 +1779,10 @@ function show_enclosed_list(io::IO, op, items, sep, cl, indent, prec=0, quote_le end const keyword_syms = Set([ - :baremodule, :begin, :break, :catch, :const, :continue, :do, :else, :elseif, + :baremodule, :begin, :break, :catch, :ccall, :const, :continue, :do, :else, :elseif, :end, :export, :var"false", :finally, :for, :function, :global, :if, :import, :let, :local, :macro, :module, :public, :quote, :return, :struct, :var"true", - :try, :using, :while ]) + :try, :using, :while]) function is_valid_identifier(sym) return (isidentifier(sym) && !(sym in keyword_syms)) || diff --git a/test/show.jl b/test/show.jl index 60d0538e71a07..2572f0beb9950 100644 --- a/test/show.jl +++ b/test/show.jl @@ -2876,6 +2876,7 @@ end # Issue 56936 @testset "code printing of var\"keyword\" identifiers" begin @test_repr """:(var"do" = 1)""" + @test_repl """:(var"ccall" = 1)""" @weak_test_repr """:(let var"let" = 1; var"let"; end)""" end