-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[4.1] Revert removal of some extensions on ImplicitlyUnwrappedOptional<T> #13976
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
[4.1] Revert removal of some extensions on ImplicitlyUnwrappedOptional<T> #13976
Conversation
@swift-ci Please smoke test |
@swift-ci Please test |
@swift-ci Please test source compatibility |
Why does it break bridging? |
@slavapestov Because the change removed the conformance to |
Linux failure is unrelated to my changes:
|
@swift-ci Please smoke test Linux platform |
The SIL parsing failure looks like a result of #12430. |
@swift-ci Please test source compatibility |
@@ -49,3 +49,73 @@ public enum ImplicitlyUnwrappedOptional<Wrapped> : ExpressibleByNilLiteral { | |||
self = .none | |||
} | |||
} | |||
|
|||
extension ImplicitlyUnwrappedOptional : CustomStringConvertible { |
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.
Should we leave this one "removed"? It's not needed to fix the regression at hand.
/// _isOptional thus cannot distinguish ImplicitlyUnwrappedOptional | ||
/// from Optional. When conditional conformance is available, this | ||
/// outright conformance can be removed. | ||
extension ImplicitlyUnwrappedOptional : CustomDebugStringConvertible { |
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.
Should we leave this one "removed"? It's not needed to fix the regression at hand.
validation-test/SIL/parse_stdlib.sil
Outdated
// methods, we're fine, but in https://github.com/apple/swift/pull/13976 | ||
// I am reintroducing extensions because removing them broke things | ||
// (bridging to ObjectiveC, for one). | ||
// REQUIRES: disabled |
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.
If we remove the two extensions I flagged above, we could leave this test enabled for Linux.
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.
Yes, true. I'll look at that. I was just hoping to revert and move forward, but if we're confident we won't hit other issues from these others being removed then we should do that.
…eCBridgeable. Partial revert of 26f6a75. Removing this breaks bridging these values to Objective C. Once IUOs are removed from the type system and ImplicitlyUnwrappedOptional<T> is removed from the library, we'll be strictly using Optional<T> which has this conformance as well.
@swift-ci Please test |
@swift-ci Please test source compatibility |
The source compat failure was a result of a problem cloning from GitHub:
|
@swift-ci Please test source compatibility |
It breaks bridging to Objective C.