Skip to content

Commit 5157d08

Browse files
simeonschaubJeffBezanson
authored andcommitted
fix bug in printing of block expressions in ref (#34503)
1 parent e5e094c commit 5157d08

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

base/show.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1584,7 +1584,7 @@ function show_unquoted(io::IO, ex::Expr, indent::Int, prec::Int, quote_level::In
15841584
show_unquoted(io, ex.args[i], ind, -1, quote_level)
15851585
end
15861586
if length(ex.args) < 2
1587-
print(isempty(ex.args) ? "nothing;)" : ";)")
1587+
print(io, isempty(ex.args) ? "nothing;)" : ";)")
15881588
else
15891589
print(io, ')')
15901590
end

test/show.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,3 +1992,4 @@ end
19921992
@weak_test_repr "a[begin, end, let x=1; (x+1;); end]"
19931993
@test repr(Base.remove_linenums!(:(a[begin, end, let x=1; (x+1;); end]))) ==
19941994
":(a[begin, end, let x = 1\n begin\n x + 1\n end\n end])"
1995+
@test_repr "a[(bla;)]"

0 commit comments

Comments
 (0)