Skip to content

Commit

Permalink
update the deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Miha Zgubic committed Sep 9, 2020
1 parent ef63558 commit 761e419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ tailmemaybe(::Nothing) = nothing
tailmemaybe(x::Tuple) = Base.tail(x)

replacezero(x) = x
replacezero(::Nothing) = @warn "Use of 'nothing' to represent zero gradients is deprecated, use Zero() or DoesNotExist() from ChainRules"; return nothing
replacezero(::Nothing) = Base.depwarn("Use of 'nothing' to represent zero gradients is deprecated, use Zero() or DoesNotExist() from ChainRules", :replacezero); return nothing
replacezero(::AbstractZero) = nothing
replacezero(t::Tuple) = ntuple(i -> replacezero(t[i]), length(t))

Expand Down

0 comments on commit 761e419

Please sign in to comment.