We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fb4ee55 + 916d7b6 commit 119e886Copy full SHA for 119e886
test/Sema/diag_invalid_interpolation_4_2.swift
@@ -0,0 +1,15 @@
1
+// RUN: %target-typecheck-verify-swift -swift-version 4.2
2
+
3
+var x = 0
4
+_ = "\(&x)"
5
+// expected-error@-1 {{'&' used with non-inout argument of type 'Int'}}
6
7
+_ = "\(y: &x)"
8
9
+// expected-warning@-2 {{labeled interpolations will not be ignored in Swift 5}}
10
+// expected-note@-3 {{remove 'y' label to keep current behavior}}
11
12
+_ = "\(x, y: &x)"
13
+// expected-error@-1 {{use of extraneous '&'}}
14
+// expected-warning@-2 {{interpolating multiple values will not form a tuple in Swift 5}}
15
+// expected-note@-3 {{insert parentheses to keep current behavior}}
0 commit comments