Skip to content

[swift-4.0-branch][stdlib] Removing < overloads #9343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2017

Conversation

moiseev
Copy link
Contributor

@moiseev moiseev commented May 5, 2017

  • Explanation: These overloads hijacked the overload resolution and resulted in a wrong code being called
  • Scope of Issue: Change is source code compatible
  • Risk: minimal
  • Reviewed By: Ben Cohen
  • Testing: Test suite
  • Directions for QA: N/A

Radar: rdar://problem/32020541

Max Moiseev added 3 commits May 5, 2017 11:33
At some point during the implementation of integer protocols these
overloads were necessary to make expressions like `i32 < 0` be faster
and unambiguous.
Now they are no longer necessary, and also cause problems for
expressions like `(u64 - u64) < u64`, where they cause the deprecated
`func - (Strideable, Strideable) -> Stride` be used, which is wrong, as
it will trap in many cases, where `func - (UInt64, UInt64) -> UInt64`
would not.

Fixes: <rdar://problem/31909031>
@moiseev
Copy link
Contributor Author

moiseev commented May 5, 2017

@swift-ci Please test

@shahmishal
Copy link
Member

@swift-ci Please test Linux

@airspeedswift airspeedswift merged commit e827d22 into swiftlang:swift-4.0-branch May 5, 2017
@moiseev moiseev deleted the less-than-4 branch May 8, 2017 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants