Skip to content

Commit

Permalink
only show actual deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin authored Oct 6, 2024
1 parent 48e255d commit 026a646
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -432,13 +432,8 @@ const All16{T,N} = Tuple{T,T,T,T,T,T,T,T,

# the plan is to eventually overload getproperty to access entries of the dict
@noinline function getproperty(x::Pairs, s::Symbol)
if s == :data
depwarn("use values(kwargs) instead of kwargs.data", :getproperty, force=true)
elseif s == :itr
depwarn("use keys(kwargs) instead of kwargs.itr", :getproperty, force=true)
else
depwarn("use NamedTuple(kwargs).$s instead of kwargs.$s", :getproperty, force=true)
end
s == :data && depwarn("use values(kwargs) instead of kwargs.data", :getproperty, force=true)
s == :itr && depwarn("use keys(kwargs) instead of kwargs.itr", :getproperty, force=true)
return getfield(x, s)
end

Expand Down

0 comments on commit 026a646

Please sign in to comment.