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 Swift 5 compiler can emit unexpected String interpolation warnings in 4.2 mode, for code guarded with a #if swift(>=5.0) clause:
#ifswift(>=5.0)
// Unexpected warning: Labeled interpolations will not be ignored in Swift 5letsql: SQLLiteral = """ SELECT * \(sql: "FROM player") """// Unexpected warning: Interpolating multiple values will not form a tuple in Swift 5letsql: SQLLiteral = """ SELECT * \(sql: "AND \("name") = :name", arguments: ["name": "Arthur"]) """
#endif
It looks like this diagnostic is not emitted during compilation, but only during code highlighting and other IDE operations. I can probably still fix it, if only by disabling the warning if we're not evaluating #ifs.
Environment
Xcode Version 10.1 (10B61)
Toolchain Swift 5 Snapshot 2019-02-06
Additional Detail from JIRA
md5: 55af157ff9913122988d0460437cabc2
Issue Description:
The Swift 5 compiler can emit unexpected String interpolation warnings in 4.2 mode, for code guarded with a
#if swift(>=5.0)
clause:Those warnings come from https://github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md#source-compatibility
They are unexpected because the code is guarded by
#if swift(>=5.0)
.For more information, see this tweet: https://twitter.com/brentdax/status/1096827747920371712
The text was updated successfully, but these errors were encountered: