Overload ambiguities should not be resolved via ranking

The (String) -> UInt32 initializer is sourced from a FixedWidthInteger extension whereas the (Float) -> UInt32 and (Double) -> UInt32 initializers are defined on UInt32 itself. This is another rule for declaration ranking: protocol extension members are 'worse' than protocol requirements, which are 'worse' than members of concrete types (all of these happen after the 'is generic' comparison that John mentions above, though).

The full logic for comparing two declarations can be found here.

3 Likes