Skip to content

Commit f7614ad

Browse files
rintarotexasmichelle
authored andcommitted
[Test] Fix test cases (#34511)
1 parent 24ff763 commit f7614ad

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

test/Misc/misc_diagnostics.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ func test17875634() {
143143
func test20770032() {
144144
if case let 1...10 = (1, 1) { // expected-warning{{'let' pattern has no effect; sub-pattern didn't bind any variables}} {{11-15=}}
145145
// expected-error@-1 {{expression pattern of type 'ClosedRange<Int>' cannot match values of type '(Int, Int)'}}
146-
// expected-error@-2 {{type '(Int, Int)' cannot conform to 'Equatable'; only concrete types such as structs, enums and classes can conform to protocols}}
147-
// expected-note@-3 {{required by operator function '~=' where 'T' = '(Int, Int)'}}
146+
// expected-error@-2 {{type '(Int, Int)' cannot conform to 'Equatable'}}
147+
// expected-note@-3 {{only concrete types such as structs, enums and classes can conform to protocols}}
148+
// expected-note@-4 {{required by operator function '~=' where 'T' = '(Int, Int)'}}
148149
}
149150
}
150151

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
// RUN: %target-swift-frontend %s -typecheck -verify
1+
// RUN: not %target-swift-frontend %s -typecheck
22

33
var d = [String:String]()
44
_ = "\(d.map{ [$0 : $0] })"
5-
// expected-error@-1 {{type 'Dictionary<String, String>.Element' (aka '(key: String, value: String)') cannot conform to 'Hashable'; only concrete types such as structs, enums and classes can conform to protocols}}
6-
// expected-note@-2 {{required by generic struct 'Dictionary' where 'Key' = 'Dictionary<String, String>.Element' (aka '(key: String, value: String)')}}

0 commit comments

Comments
 (0)