Skip to content

[TypeChecker] SE-0324: Extend Swift -> C pointer conversions to arrays #64249

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 3 commits into from
Mar 15, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Mar 9, 2023

Extends implementation to support conversions between arrays
and pointers (when element type is an (un-)signed integer) that are
allowed by the SE-0324 proposal.

Resolved: rdar://99089335

@xedin xedin requested a review from atrick March 9, 2023 19:18
@xedin xedin requested a review from hborla as a code owner March 9, 2023 19:18
@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Mar 9, 2023

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Mar 10, 2023

Interesting, looks like my changes made existing conversion slightly more narrow...

@xedin xedin marked this pull request as draft March 10, 2023 00:32
xedin added 3 commits March 14, 2023 11:22
It's `ArrayToPointer` conversion that has PointerToCPointer
semantics for (un-)signed integer element types.
Extends implementation to support conversions between arrays
and pointers that are allowed by the SE-0324 proposal.

Resolved: rdar://99089335
…ument" pointers

If the type of the "argument" pointer is not yet resolved the solver
should equate it to that of the "parameter" pointer as regular
conversions do.
@xedin
Copy link
Contributor Author

xedin commented Mar 14, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Mar 14, 2023

@swift-ci please test source compatibility

@xedin xedin marked this pull request as ready for review March 15, 2023 04:50
@xedin
Copy link
Contributor Author

xedin commented Mar 15, 2023

Debug build failure seems unrelated:

Undefined symbols for architecture x86_64:
  "(extension in XCTest):__C.XCTestCase.addTeardownBlock(() async throws -> ()) -> ()", referenced from:
      SWIMNIOExampleTests.BaseClusteredXCTestCase.setUp() -> () in BaseXCTestCases.swift.o
ld: symbol(s) not found for architecture x86_64

@xedin
Copy link
Contributor Author

xedin commented Mar 15, 2023

Indeed it fails on main branch as well i.e. https://ci.swift.org/job/swift-main-source-compat-suite-debug/362/

@xedin xedin merged commit 290b07d into swiftlang:main Mar 15, 2023
@atrick
Copy link
Contributor

atrick commented Mar 17, 2023

@xedin looks great! Thanks for taking care of this.

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.

3 participants