Annotating global variable's type (v1.8) but only known at runtime

I’m thinking about how in v1.8 you can annotate a global variable with a fixed type e.g. a::Int = 4. Is there a way to specify the variable has a fixed type but it’s inferred from the runtime value at assignment? It happens with const e.g. const a = 3.5im * 5im, but of course the value is assumed constant there as well.

5 Likes