How to make an immutable a possible type parameter for Val(...)

struct Temp{A}
    a::A
end
Val((1,2))          #Works
Val(Temp((1,2)))    #Works
Val((:a,:b))        #Works
Val(Temp((:a,:b)))  #Fails

I don’t really get why the second and third work, but the 4th doesn’t? The third also returns false when the isbits function is called. Is there any way to make this work?

3 Likes