Skip to content

Commit

Permalink
remove @pure (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Apr 30, 2023
1 parent 29ea2ad commit 95486a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/base-traits.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export IsLeafType, IsConcrete, IsBits, IsImmutable, IsContiguous, IsIndexLinear,

"Trait of all isbits-types"
@traitdef IsBits{X}
Base.@pure _isbits(X) = isbitstype(X)
_isbits(X) = isbitstype(X)
@traitimpl IsBits{X} <- _isbits(X)

"Trait of all immutable types"
@traitdef IsImmutable{X}
if VERSION >= v"1.7.0-DEV.1279"
Base.@pure _isimmutable(X) = !(Base.ismutabletype(X))
_isimmutable(X) = !(Base.ismutabletype(X))
else
Base.@pure _isimmutable(X) = !X.mutable
_isimmutable(X) = !X.mutable
end
@traitimpl IsImmutable{X} <- _isimmutable(X)

Expand Down

0 comments on commit 95486a2

Please # to comment.