Skip to content

Commit a16518b

Browse files
committed
---
yaml --- r: 347133 b: refs/heads/master c: 367cc7d h: refs/heads/master i: 347131: feeaeaa
1 parent 4b3983c commit a16518b

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: d84eee26b9166167ad4779b9ffa50b90435413f1
2+
refs/heads/master: 367cc7de10d76b5b4965dcd3f4257e33b5614a14
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ ERROR(cannot_apply_lvalue_binop_to_rvalue,none,
213213
"left side of mutating operator has immutable type %0", (Type))
214214

215215
ERROR(cannot_subscript_with_index,none,
216-
"cannot subscript a value of type %0 with an index of type %1",
216+
"cannot subscript a value of type %0 with an argument of type %1",
217217
(Type, Type))
218218

219219
ERROR(cannot_subscript_base,none,

trunk/test/Constraints/diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func r21459429(_ a : Int) {
215215
}
216216

217217

218-
// <rdar://problem/21362748> [WWDC Lab] QoI: cannot subscript a value of type '[Int]?' with an index of type 'Int'
218+
// <rdar://problem/21362748> [WWDC Lab] QoI: cannot subscript a value of type '[Int]?' with an argument of type 'Int'
219219
struct StructWithOptionalArray {
220220
var array: [Int]?
221221
}

trunk/test/Constraints/subscript.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class C_r25601561 {
110110
// rdar://problem/31977679 - Misleading diagnostics when using subscript with incorrect argument
111111

112112
func r31977679_1(_ properties: [String: String]) -> Any? {
113-
return properties[0] // expected-error {{cannot subscript a value of type '[String : String]' with an index of type 'Int'}}
113+
return properties[0] // expected-error {{cannot subscript a value of type '[String : String]' with an argument of type 'Int'}}
114114
}
115115

116116
func r31977679_2(_ properties: [String: String]) -> Any? {

trunk/test/decl/subscript/subscripting.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ struct SubscriptTest2 {
318318
}
319319

320320
func testSubscript1(_ s2 : SubscriptTest2) {
321-
_ = s2["foo"] // expected-error {{cannot subscript a value of type 'SubscriptTest2' with an index of type 'String'}}
321+
_ = s2["foo"] // expected-error {{cannot subscript a value of type 'SubscriptTest2' with an argument of type 'String'}}
322322
// expected-note @-1 {{overloads for 'subscript' exist with these partially matching parameter lists: (String, Int), (String, String)}}
323323

324-
let a = s2["foo", 1.0] // expected-error {{cannot subscript a value of type 'SubscriptTest2' with an index of type '(String, Double)'}}
324+
let a = s2["foo", 1.0] // expected-error {{cannot subscript a value of type 'SubscriptTest2' with an argument of type '(String, Double)'}}
325325
// expected-note @-1 {{overloads for 'subscript' exist with these partially matching parameter lists: (String, Int), (String, String)}}
326326

327327
_ = s2.subscript("hello", 6)

trunk/test/type/types.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var d3 : () -> Float = { 4 }
1919
var d4 : () -> Int = { d2 } // expected-error{{function produces expected type 'Int'; did you mean to call it with '()'?}} {{26-26=()}}
2020

2121
var e0 : [Int]
22-
e0[] // expected-error {{cannot subscript a value of type '[Int]' with an index of type '()'}}
22+
e0[] // expected-error {{cannot subscript a value of type '[Int]' with an argument of type '()'}}
2323
// expected-note @-1 {{overloads for 'subscript' exist with these partially matching parameter lists: ((UnboundedRange_) -> ()), (Int), (R), (Range<Int>), (Range<Self.Index>)}}
2424

2525
var f0 : [Float]

0 commit comments

Comments
 (0)