Skip to content

[5.1]Remove redundant leading/trailing trivia from StringLiteralExpr #138

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 2 commits into from
Jul 24, 2019

Conversation

akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Jul 24, 2019

Overview

This PR introduced a bug to set leading/trailing trivia to StringSegment as well. This causes unexpected behavior like below

SyntaxFactory.makeStringLiteralExpr(
    "foo", 
    leadingTrivia: .newlines(1), 
    trailingTrivia: .newlines(1)
)

Expected


"foo"

Actual


"
foo
"

master: #135

@akyrtzi
Copy link
Contributor Author

akyrtzi commented Jul 24, 2019

@swift-ci Please test

@akyrtzi akyrtzi merged commit 1a584ee into swiftlang:swift-5.1-branch Jul 24, 2019
@akyrtzi akyrtzi deleted the 5.1-SR-10241_bug_fix branch July 24, 2019 21:30
adevress pushed a commit to adevress/swift-syntax that referenced this pull request Jan 14, 2024
…eper

Transform nested structs in UseEnumForNamespacing.
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