Skip to content

[5.3][AST] Mark repr invalid only if @autoclosure parameter doesn't poin… #33162

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
Jul 29, 2020

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jul 28, 2020

…t to function type

Cherry-pick of #33145


  • Explanation:

Instead on depending on repr to be a function, let's only check
whether type resolved for @autoclosure points to a function type
because it's allowed for @autoclosure parameters to be to
wrapped into parens or be represented by a typealias.

  • Scope: Limited to declarations which use @autoclosure with parens or typealias.

  • Resolves: rdar://problem/65704049

  • Risk: Very Low

  • Testing: Added regression tests

  • Reviewer: @rintaro

Resolves: rdar://problem/65704049
(cherry picked from commit f2c2aa5)

…t to function type

Instead on depending on repr to be a function, let's only check
whether type resolved for `@autoclosure` points to a function type
because it's allowed for `@autoclosure` parameters to be to
wrapped into parens or be represented by a typealias.

Resolves: rdar://problem/65704049
(cherry picked from commit f2c2aa5)
@xedin xedin added the r5.3 label Jul 28, 2020
@xedin xedin requested a review from a team as a code owner July 28, 2020 19:27
@xedin
Copy link
Contributor Author

xedin commented Jul 28, 2020

@swift-ci please test

@xedin xedin merged commit 50db6e4 into swiftlang:release/5.3 Jul 29, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants