I was a bit surprised when I tried this example: function foo() global G #b = Float32(G) b = convert(Float32,G) b end
G = 0.5 println(foo()) code_warntype(foo,()) and code_warntype deduced that the type of b is ANY instead of Float32. Is this a bug or a feature? If I use the constructor syntax instead (see comment in code), then the type of b is deduced as Float32.