Skip to content
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

[cxx-interop] Correctly import fields with type NS_OPTION. #66452

Merged
merged 1 commit into from
Jun 9, 2023

Conversation

zoecarver
Copy link
Collaborator

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves #NNNNN, fix apple/llvm-project#MMMMM.

@zoecarver
Copy link
Collaborator Author

@swift-ci please test

@zoecarver
Copy link
Collaborator Author

@swift-ci please test

@zoecarver zoecarver force-pushed the ns-option-as-field-take-two branch from 62d4082 to 3f45c17 Compare June 8, 2023 20:12
@zoecarver
Copy link
Collaborator Author

@swift-ci please test

@zoecarver zoecarver changed the title [cxx-interop] Correctly import fields with type NS_Option. [cxx-interop] Correctly import fields with type NS_OPTION. Jun 8, 2023
@zoecarver zoecarver merged commit f9bd1a5 into apple:main Jun 9, 2023
5 checks passed
plotfi added a commit to plotfi/swift that referenced this pull request Jun 29, 2023
… reusable.

Zoe did a nice fix on apple#66452
that I would like to reuse for ObjCPropertyDecl field types in
importObjCPropertyDecl as well. This will fix cases such as:

```
import UIKit

func f(gesture: UISwipeGestureRecognizer,
       direction: UISwipeGestureRecognizer.Direction) {
  gesture.direction = direction // error
}
```

because it will make sure the field inside class UIGestureRecognizer is
of the enum-struct type and not the typedef-rawValue type when importing
an ObjC class.
plotfi added a commit to plotfi/swift that referenced this pull request Jun 30, 2023
… reusable.

Zoe did a nice fix on apple#66452
that I would like to reuse for ObjCPropertyDecl field types in
importObjCPropertyDecl as well. This will fix cases such as:

```
import UIKit

func f(gesture: UISwipeGestureRecognizer,
       direction: UISwipeGestureRecognizer.Direction) {
  gesture.direction = direction // error
}
```

because it will make sure the field inside class UIGestureRecognizer is
of the enum-struct type and not the typedef-rawValue type when importing
an ObjC class.
plotfi added a commit to plotfi/swift that referenced this pull request Jul 5, 2023
… reusable.

Zoe did a nice fix on apple#66452
that I would like to reuse for ObjCPropertyDecl field types in
importObjCPropertyDecl as well. This will fix cases such as:

```
import UIKit

func f(gesture: UISwipeGestureRecognizer,
       direction: UISwipeGestureRecognizer.Direction) {
  gesture.direction = direction // error
}
```

because it will make sure the field inside class UIGestureRecognizer is
of the enum-struct type and not the typedef-rawValue type when importing
an ObjC class.

(cherry picked from commit ec5b7b0)
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.

None yet

2 participants