Skip to content

[5.3][ASTPrinter] Don't print inferred opaque result type witness #31834

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

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 15, 2020

Cherry-pick of #31821 into. release/5.3

  • Explanation: Opaque result type syntax is not usable except at the declaration itself. In other places, users need to let them inferred. Or, if they are used as associated types, they can only be referred by the name of the associated types. In substType(), if a type witness is found to be a opaque result type, use the interface type of the witness decl which is a implicit typealias decl/type so that opaque result types don't appear in function parameter position etc.
  • Scope: AST type printing including code completion and cursor info.
  • Risk: Low. This only affects type printing. Doesn't affect compilation or typechecking.
  • Issue: rdar://problem/59817674, rdar://problem/62232092
  • Testing: Added regression test cases
  • Reviewer: Ben Langmuir (@benlangmuir)

Opaque result type syntax is not usable except the declaration of
itself. In other places, users need to let them inferred. If they are
inferred associated type, they need to reffered by the name of the
associated type.

rdar://problem/59817674
(cherry picked from commit 29398b1)
@rintaro rintaro requested a review from a team as a code owner May 15, 2020 23:18
@rintaro
Copy link
Member Author

rintaro commented May 15, 2020

@swift-ci Please test

@rintaro
Copy link
Member Author

rintaro commented May 15, 2020

@swift-ci Please nominate

@rintaro rintaro added the r5.3 label May 16, 2020
@rintaro rintaro changed the title [ASTPrinter] Don't print inferred opaque result type witness [5.3][ASTPrinter] Don't print inferred opaque result type witness May 16, 2020
@akyrtzi akyrtzi merged commit 39914b4 into swiftlang:release/5.3 May 16, 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