-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Disallow some implicit pointer conversions in autoclosures. #16623
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
Conversation
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
The diagnostics for the |
@slavapestov I renamed an existing (and oddly named) locator to directly track type matches on the result of an auto closure expr. |
Nice, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
swiftlang/swift-corelibs-foundation#1552 @swift-ci Please smoke test Linux platform |
Disallow implicit conversion or arguments from Array, String, and InOut (formed by &) to pointer types if the argument is for an @autoclosure parameter. These conversions were really only intended to be used for C/ObjC interop, and in some contexts like autoclosures they are not safe. Fixes: rdar://problem/31538995
@swift-ci Please smoke test |
@swift-ci Please test source compatibility |
@swift-ci Please smoke test Linux platform |
@swift-ci Please test source compatibility |
Disallow implicit conversion or arguments from Array, String, and
InOut (formed by &) to pointer types if the argument is for an
@autoclosure parameter.
These conversions were really only intended to be used for C/ObjC
interop, and in some contexts like autoclosures they are not safe.
Fixes: rdar://problem/31538995