Skip to content

Fix bug that caused the rootId of a node to not be updated if it was created by a replacing* function #202

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Jan 29, 2020

When creating a node using e.g. replacingTrailingTrivia, it would still have the same the same rootId as before. Because of this SyntaxRewriter would not detect the node as having changed, thus failing to replace it in the rewritten tree.

…created by a replacing* function

When creating a node using e.g. `replacingTrailingTrivia`, it would
still have the same the same rootId as before. Because of this
`SyntaxRewriter` would not detect the node as having changed, thus
failing to replace it in the rewritten tree.
@ahoppen ahoppen requested a review from akyrtzi January 29, 2020 19:58
@ahoppen
Copy link
Member Author

ahoppen commented Jan 29, 2020

@swift-ci Please test

@akyrtzi
Copy link
Contributor

akyrtzi commented Jan 29, 2020

Could you also create a PR on swift-5.2 branch?

@ahoppen ahoppen merged commit 16f6af5 into swiftlang:master Jan 29, 2020
@ahoppen ahoppen deleted the update-root-id branch January 14, 2023 08:22
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
Correct version string for `--version` flag (master)
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.

2 participants