The following example doesn't work:
immutable Foo{T<:Real}
a::T = one(T)
end
it says that T is undefined. I can just use the literal 1, but that triggers a conversion behind the scenes, correct?
Also, I'd love to see this functionality as part of the language with additional syntax. Is there an issue tracking this feature request yet?