Type declaration in function definition

f(x::Real) hasn’t had any problems since at least 0.6. The place where specific type annotations matter is in struct definitions. Functions specialize automatically on the types of their inputs.

1 Like