Skip to content

Commit

Permalink
add a note to ismutable docstring about String and Symbol (#48149)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored Jan 6, 2023
1 parent 6d14b0f commit 463e5f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,10 @@ Return `true` if and only if value `v` is mutable. See [Mutable Composite Types
for a discussion of immutability. Note that this function works on values, so if you
give it a `DataType`, it will tell you that a value of the type is mutable.
!!! note
For technical reasons, `ismutable` returns `true` for values of certain special types
(for example `String` and `Symbol`) even though they cannot be mutated in a permissible way.
See also [`isbits`](@ref), [`isstructtype`](@ref).
# Examples
Expand Down

0 comments on commit 463e5f0

Please sign in to comment.