-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Typechecker] Fix a few regressions with @autoclosure #28677
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 smoke test macOS |
@theblixguy Could we please limit this to your original fix? I can get that into master and 5.2. Requestifying can happen after. |
Sure! I’ll split the request into a separate PR. |
Thank you! |
@autoclosure" This reverts commit 3b1d4308bd3444230bfc7d031f7ccfa3b366a038.
@xedin Done. I have kept the core logic as is, but removed all the requestification bits. It passes all tests in |
@swift-ci please test |
@swift-ci please test source compatibility |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Okay, tests have pretty much passed (just waiting for Release source compat). I'll create a new PR for 5.2 branch |
Sounds good! Thank you, @theblixguy! |
Since Swift 5.1, we have a few regressions around the use of @autoclosure.
@autoclosure
type is not a function type, but just a variadic type. For example:@autoclosure
in parameter position. For example, the following does not get diagnosed, even though it should:() -> String...
as the type and we pass it a value, then we crash in CSApply after diagnosing the error. I have filed a separate bug for it.Resolves SR-11934, SR-11938
Resolves: rdar://problem/57824033