diff --git a/base/show.jl b/base/show.jl index 09b232e54ade6..e9d1b6496713d 100644 --- a/base/show.jl +++ b/base/show.jl @@ -1671,7 +1671,8 @@ julia> Base.operator_associativity(:⊗), Base.operator_associativity(:sin), Bas """ function operator_associativity(s::Symbol) if operator_precedence(s) in (prec_arrow, prec_assignment, prec_control_flow, prec_pair, prec_power) || - (isunaryoperator(s) && !is_unary_and_binary_operator(s)) || s === :<| || s === :|| + (isunaryoperator(s) && !is_unary_and_binary_operator(s)) || + (s === :<| || s === :|| || s == :?) return :right elseif operator_precedence(s) in (0, prec_comparison) || s in (:+, :++, :*) return :none