JuliaLang / Compat.jl

Compatibility across Julia versions
Other
145 stars 117 forks source link

print nothing #698

Closed aminya closed 2 years ago

aminya commented 4 years ago

For Julia <= 1.2 the following method is not defined.

if VERSION <=  v"1.2"
    Base.print(io, ::Nothing) = Base.print(io, "")
    Base.print(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Nothing) = Base.print(io, "")
    Base.string(::Nothing) = ""
end
martinholters commented 2 years ago

In Julia 1.6 and later, all these give "nothing", so this seems outdated/unnecessary with Compat targeting Jula 1.6+.