Skip to content

[Test] Added for call-as-async Optional<NS_EXTENSIBLE_STRING_ENUM>. #38786

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 2 commits into from
Aug 10, 2021

Conversation

nate-chandler
Copy link
Contributor

The underlying problem was fixed by the change for rdar://81590807 . Add tests
for the specific case that was originally reported.

Requires #38773 .

rdar://80704382

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

Previously, the function emitCBridgedToNativeValue handled three
situations around optionals:
- Bridged?, Native?
- Bridged, Native?
- Bridged, Native

Here, handling for the fourth case
- Bridged?, Native
is added.

To enable this, the number of Optional wrappings that the bridged type
has that the native type does not is passed in to the function.  Then,
in the portions of the function where actual transformations are done,
the values are unwrapped an appropriate number of times.  Mostly that
means force unwrapping N times before doing the transformation.  In the
case of types that conform to _ObjectiveCBridgeable, however, it means
force unwrapping the value N-1 times after doing the transformation
because _ObjectiveCBridgeable._unconditionallyBridgeFromObjectiveC
performs one layer of unwrapping itself.

rdar://81590807
The underlying problem was fixed by the change for rdar://81590807 .
Add tests for the specific case that was originally reported.

rdar://80704382
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 03e175a

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test macos platform

@nate-chandler nate-chandler merged commit 923c69d into swiftlang:main Aug 10, 2021
@nate-chandler nate-chandler deleted the rdar80704382 branch August 10, 2021 16:54
meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request Aug 25, 2021
[Test] Added for call-as-async Optional<NS_EXTENSIBLE_STRING_ENUM>.
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.

2 participants