Skip to content

[AST] Properly recurse when reconstituting sugar #25937

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 5, 2019

Conversation

hamishknight
Copy link
Contributor

Currently even when reconstituteSugar's Recursive parameter is set to true, we stop rebuilding sugar upon hitting a desugared type. For example Optional<Optional<Int>> will only be re-sugared to Optional<Int>?. This PR changes the behaviour so we continue recursing into the generic argument.

(Noticed by inspection)

Currently even when `reconstituteSugar`'s `Recursive` parameter is set
to `true`, we stop rebuilding sugar upon hitting a desugared type. For
example `Optional<Optional<Int>>` will only be re-sugared to
`Optional<Int>?`. This commit changes the behaviour so we continue
recursing into the generic argument.
@hamishknight
Copy link
Contributor Author

cc. @slavapestov

@DougGregor
Copy link
Member

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit c6b8ae5 into swiftlang:master Jul 5, 2019
@hamishknight hamishknight deleted the all-the-sugar branch July 5, 2019 18:45
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