Skip to content

[TypeChecker] SE-0324: Extend Swift -> C pointer conversions to inout #59051

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
May 26, 2022

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 24, 2022

Fixes an oversight where inout -> C pointer conversion wasn't covered
by implementation of new pointer conversion semantics proposed by SE-0324.

Resolves: rdar://92583588

@xedin xedin requested review from atrick and hborla May 24, 2022 17:04
@xedin
Copy link
Contributor Author

xedin commented May 25, 2022

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented May 25, 2022

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented May 25, 2022

@swift-ci please test source compatibility debug

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Pavel!

I guess for completeness the tests could also add:

void const_opt_void_ptr_func(const void * _Nullable buffer);

And could call

const_int_${Size}_ptr_func(&x${Size}) // OK
const_uint_${Size}_ptr_func(&x${Size}) // OK
const_opt_int_${Size}_ptr_func(&x${Size}) // OK
const_opt_uint_${Size}_ptr_func(&x${Size}) // OK

Fixes an oversight where `inout` -> C pointer conversion wasn't covered
by implementation of new pointer conversion semantics proposed by SE-0324.

Resolves: rdar://92583588
@xedin
Copy link
Contributor Author

xedin commented May 26, 2022

Done!

@xedin
Copy link
Contributor Author

xedin commented May 26, 2022

@swift-ci please smoke test

@xedin xedin merged commit b0c4947 into swiftlang:main May 26, 2022
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