Semantics of :: in return type vs. argument type annotations

No, x = y = 1 is the same as x = (y = 1), and 1 is assigned to both variables (the sensible choice) regardless of y::Float64’s conversion, so the subexpression y = 1 must have a value of 1. Again the choice of either side wouldn’t matter if conversion didn’t happen.

1 Like