Docs say that type annotations on variables and return types of functions facilitate type inference and performance. But does the opposite hold? If I have a function:
function foo(x)::Number if isa(x, Number) return x else return 0 end end
convert(Number, ...) method be called on the return value of
foo, or it will be a no-op, for it is clear that both
In general, if I have a variable with type annotation, is
convert called at every assignment to the variable or it optimized away whenever type inference is sure about the type of RHS?