You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code sample is misleading and has to emit a warning, either to remove the trailing whitespaces manually or providing a `Fix-it` that will trim them.
lets = """ abc """print(s.characters.count) // prints 66
The current workaround without the trailing backslash if the white spaces are desired could look like this:
lets = """ abc \("") """print(s.characters.count) // prints 66
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: b02403b86a147e7ddfe690b69150eb0d
Issue Description:
The PR for https://bugs.swift.org/browse/SR-170 implements a half baked multiline string literal.
There are two issues remaining, however this issue report is only about the first one:
1. Warning about trailing whitespaces.
2. Trailing backslash to escape new lines:
https://github.com/hartbit/swift-evolution/blob/literal-string-improvements/proposals/XXXX-improve-string-literals.md
Newline escapes in Swift Strings swift-evolution#695
However Joe Groff said in the following posts, that it's a reasonable thing to warn about:
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170417/035931.html
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170417/035934.html
The following code sample is misleading and has to emit a warning, either to remove the trailing whitespaces manually or providing a `Fix-it` that will trim them.
The current workaround without the trailing backslash if the white spaces are desired could look like this:
The text was updated successfully, but these errors were encountered: