Skip to content

Commit

Permalink
remove depwarn and move isimmutable to the bottom of deprecated.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ssikdar1 committed Feb 4, 2020
1 parent 8faa424 commit 6b76c59
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
21 changes: 21 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,24 @@ MPFR.BigFloat(x::Real, prec::Int, rounding::RoundingMode) = BigFloat(x, rounding
end

# END 1.3 deprecations

# BEGIN 1.5 deprecations
"""
isimmutable(v) -> Bool
Return `true` iff value `v` is immutable. See [Mutable Composite Types](@ref)
for a discussion of immutability. Note that this function works on values, so if you give it
a type, it will tell you that a value of `DataType` is mutable.
# Examples
```jldoctest
julia> isimmutable(1)
true
julia> isimmutable([1,2])
false
```
"""
isimmutable(@nospecialize(x)) = (@_pure_meta; !typeof(x).mutable)

# END 1.5 deprecations
21 changes: 0 additions & 21 deletions base/reflection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -401,27 +401,6 @@ function datatype_fielddesc_type(dt::DataType)
return (flags >> 1) & 3
end

"""
isimmutable(v) -> Bool
Return `true` iff value `v` is immutable. See [Mutable Composite Types](@ref)
for a discussion of immutability. Note that this function works on values, so if you give it
a type, it will tell you that a value of `DataType` is mutable.
# Examples
```jldoctest
julia> isimmutable(1)
true
julia> isimmutable([1,2])
false
```
"""
function isimmutable(@nospecialize(x))
depwarn(" isimmutable is deprecated use ismutable instead ", :isimmutable)
return (@_pure_meta; !typeof(x).mutable)
end

"""
ismutable(v) -> Bool
Expand Down

0 comments on commit 6b76c59

Please sign in to comment.