Skip to content
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 base/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,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(io, isempty(ex.args) ? "nothing;)" : ";)")
print(io, isempty(ex.args) ? ";;)" : ";)")
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 @@ -1993,4 +1993,5 @@ 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;)]"
@test_repr "a[(;;)]"
@weak_test_repr "a[x -> f(x)]"
1 change: 1 addition & 0 deletions test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ macro test999_str(args...); args; end
# blocks vs. tuples
@test Meta.parse("()") == Expr(:tuple)
@test_skip Meta.parse("(;)") == Expr(:tuple, Expr(:parameters))
@test Meta.parse("(;;)") == Expr(:block)
@test Meta.parse("(;;;;)") == Expr(:block)
@test_throws ParseError Meta.parse("(,)")
@test_throws ParseError Meta.parse("(;,)")
Expand Down