Skip to content

Commit

Permalink
Clarify that modifyproperty! does not call convert (#45178)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored May 6, 2022
1 parent f1ac0cf commit 350376b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base/docs/basedocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2758,6 +2758,11 @@ The syntax `@atomic max(a().b, c)` returns `modifyproperty!(a(), :b,
max, c, :sequentially_consistent))`, where the first argument must be a
`getfield` expression and is modified atomically.
Unlike [`setproperty!`](@ref Base.setproperty!), the default implementation of
`modifyproperty!` does not call `convert` automatically. Thus, `op` must return a value
that can be stored in the field `f` directly when invoking the default `modifyproperty!`
implementation.
See also [`modifyfield!`](@ref Core.modifyfield!)
and [`setproperty!`](@ref Base.setproperty!).
"""
Expand Down

0 comments on commit 350376b

Please sign in to comment.