Skip to content

Commit

Permalink
fix bug in printing of block expressions in ref (JuliaLang#34503)
Browse files Browse the repository at this point in the history
  • Loading branch information
simeonschaub authored and JeffBezanson committed Jan 24, 2020
1 parent e5e094c commit 5157d08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,7 @@ function show_unquoted(io::IO, ex::Expr, indent::Int, prec::Int, quote_level::In
show_unquoted(io, ex.args[i], ind, -1, quote_level)
end
if length(ex.args) < 2
print(isempty(ex.args) ? "nothing;)" : ";)")
print(io, isempty(ex.args) ? "nothing;)" : ";)")
else
print(io, ')')
end
Expand Down
1 change: 1 addition & 0 deletions test/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1992,3 +1992,4 @@ end
@weak_test_repr "a[begin, end, let x=1; (x+1;); end]"
@test repr(Base.remove_linenums!(:(a[begin, end, let x=1; (x+1;); end]))) ==
":(a[begin, end, let x = 1\n begin\n x + 1\n end\n end])"
@test_repr "a[(bla;)]"

0 comments on commit 5157d08

Please sign in to comment.