on Fri Jan 13 2017, Max Moiseev <swift-evolution@swift.org> wrote:

> So, in an expression `x &>> 32`, compiler assumes 32 to have type Int
> (which is the default type for the integer literals) and prefer the
> heterogeneous overload. It might not be too bad, as I showed in
> examples above, but in order to increase chances of success you might
> want to specify an explicit type context, as in `x &>> (32 as
> TypeOfX)`.

It's easy to prove that the heterogeneous overload can't have different
semantics from the homogeneous one, so there is absolutely nothing to
worry about—other than, arguably, that it could take slightly more
time to type-check.

-- 
-Dave

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to