-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Sema: Remove ConstraintKind::OneWayBindParam and ConstraintKind::OneWayEqual #78301
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
Sema: Remove ConstraintKind::OneWayBindParam and ConstraintKind::OneWayEqual #78301
Conversation
@swift-ci please test source compatibility |
@swift-ci Please smoke test |
For posterity. This might cause a difference in behavior for things like:
because |
I think we can follow-up with a small refactoring of |
8cc6da2
to
2d48060
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Last 2 commits) Neat!
…tely Instead of using `one-way` constraints, just like in closure contexts for-in statements should type-check their `where` clauses separately. This also unifies and simplifies for-in preamble handling in the solver.
…al base in diagnostic mode Re-introduce unsolved member constraint when optional object is a type variable or member until it's bound, otherwise it's impossible to tell whether unwrapped base would have a member or not.
…ied to a member `TVO_PrefersSubtypeBinding` in this case is intended to support references to Objective-C imported members that can be force unwrapped before being used i.e. accessing an overloaded method on `AnyObject` should always prefer an overload that returns a subtype: ``` @objc class A: NSObject { @objc func test() -> A { } @objc func test() -> B { } } func test(obj: AnyObject) { obj.test!() } ``` where `B` is a subtype of `A` should result in selection of `() -> B`.
a0fbd89
to
80a988e
Compare
@swift-ci please test |
@swift-ci please test source compatibility |
@swift-ci please test source compatibility debug |
Debug config failures are unrelated to these changes, main fails the same way - https://ci.swift.org/job/swift-main-source-compat-suite-debug/989/ |
@swift-ci Please test |
@swift-ci Please test source compatibility |
I had to revert swiftlang#78301 to fix rdar://143338891. This now brings back the change, but without deleting code; instead, it's guarded by the -disable-optimized-restrictions flag. Once the flag is removed, I will once again completely delete OneWayEqual constraints.
I had to revert swiftlang#78301 to fix rdar://143338891. This now brings back the change, but without deleting code; instead, it's guarded by the -disable-optimized-restrictions flag. Once the flag is removed, I will once again completely delete OneWayEqual constraints.
I had to revert swiftlang#78301 to fix rdar://143338891. This now brings back the change, but without deleting code; instead, it's guarded by the -disable-optimized-restrictions flag. Once the flag is removed, I will once again completely delete OneWayEqual constraints.
I had to revert swiftlang#78301 to fix rdar://143338891. This now brings back the change, but without deleting code; instead, it's guarded by the -disable-optimized-restrictions flag. Once the flag is removed, I will once again completely delete OneWayEqual constraints.
No description provided.