On Wednesday, August 17, 2016 at 4:51:43 PM UTC-4, Kiran Pamnany wrote:
>
> No, I mean when I am passed a type as a function parameter, is there a way 
> to check if it has been declared as an immutable type?
>

There doesn't seem to be a built-in function for this (the isimmutable 
function works on values, not types), but the following function should 
work:

isimmutable_type{T}(::Type{T}) = T <: Tuple || !T.mutable 

Reply via email to