Skip to content

[5.10][cxx-interop] disallow use of non-trivial C++ types in @objc declarat… #69343

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 1 commit into from
Oct 24, 2023

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Oct 23, 2023

…ions

Even though such types can technically be represented in C++, Swift's @objc support does not support them

rdar://114163485
(cherry picked from commit c2e15d6)

Explanation:
Swift's @objc methods and properties do not support returning non-trivial C++ records. This change ensures that such types are explicitly disallowed for @objc methods instead of crashing the compiler.
Scope: C++ interop, type-checker
Risk: Low, only affects C++ interop and @objc type-checking.
Testing: Unit tests
Original PR: #69262

…ions

Even though such types can technically be represented in C++, Swift's @objc support does not support them

rdar://114163485
(cherry picked from commit c2e15d6)
@hyp hyp added c++ interop Feature: Interoperability with C++ swift 5.10 labels Oct 23, 2023
@hyp hyp requested a review from a team as a code owner October 23, 2023 21:33
@hyp
Copy link
Contributor Author

hyp commented Oct 23, 2023

@swift-ci please test

@hyp
Copy link
Contributor Author

hyp commented Oct 23, 2023

@swift-ci please test source compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ interop Feature: Interoperability with C++ swift 5.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants