We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba96757 commit 55f48e0Copy full SHA for 55f48e0
src/types.jl
@@ -778,12 +778,14 @@ end
778
779
function show_call(io, f, args)
780
fname = istree(f) ? Symbol(repr(f)) : nameof(f)
781
- binary = Base.isbinaryoperator(fname)
782
- if binary
783
- for (i, t) in enumerate(args)
784
- i != 1 && print(io, " $fname ")
785
- print_arg(io, t, paren=true)
786
- end
+ len_args = length(args)
+ if Base.isunaryoperator(fname) && len_args == 1
+ print(io, "$fname")
+ print_arg(io, first(args), paren=true)
+ elseif Base.isbinaryoperator(fname) && len_args == 2
787
+ print(io, " $fname ")
788
+ print_arg(io, last(args), paren=true)
789
else
790
if issym(f)
791
Base.show_unquoted(io, nameof(f))
0 commit comments