You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> using Test
julia> new() = "new"
julia> @deprecate old new
julia> old()
┌ Warning: `old` is deprecated, use `new` instead.
│ caller = top-level scope at REPL[8]:1
└ @ Core REPL[8]:1
"new"
julia> @test_deprecated old()
"new"
which passes the test,
to deprecating structs with @deprecate_binding
julia> struct New
x
end
julia> Base.@deprecate_binding Old New
julia> Old
WARNING: Main.Old is deprecated, use New instead.
likely near REPL[13]:1
New
julia> @test_deprecated Old
WARNING: Main.Old is deprecated, use New instead.
likely near REPL[11]:1
Log Test Failed at REPL[11]:1
Expression: $(Expr(:escape, :Old))
Log Pattern: (:warn, r"deprecated"i, Ignored(), :depwarn) match_mode = :any
Captured Logs:
ERROR: There was an error during testing
which does not.
I assume the reason is that @deprecate emits a real warning whereas @deprecate_binding just prints WARNING?
The text was updated successfully, but these errors were encountered:
Compare deprecating functions with
@deprecate
which passes the test,
to deprecating structs with
@deprecate_binding
which does not.
I assume the reason is that
@deprecate
emits a real warning whereas@deprecate_binding
just printsWARNING
?The text was updated successfully, but these errors were encountered: