Greetings everyone,

So we all know that Symbol is not a bits type.
And AFAIK only bits types can be used as type parameter.

However, I can still use Symbol as a type parameter in type signatures.
Is there a special property of Symbol that allows it to do so? Or is there 
something I'm missing here?

Here are a few examples below using Julia-0.5.0-rc2:

isbits(Symbol)  # false
isbits(:x) # false

type A{S} end
A{:x}()  # valid
isbits(A)  # false
isbits(A{:x}())  # false

immutable B{S} end
B{:x}()  # valid
isbits(B)  # true
isbits(B{:x}())  # true

Can anyone please provide me with an explanation as to what can and cannot 
be a parameter type?


Thank you,
Yousef

Reply via email to