From 907fb78e7a1b89aac1b03848b590cedd7dd9c012 Mon Sep 17 00:00:00 2001 From: Rintaro Ishizaki Date: Thu, 29 Oct 2020 22:06:03 -0700 Subject: [PATCH] [Test] Fix test cases --- test/Misc/misc_diagnostics.swift | 5 +++-- .../Sema/type_checker_crashers_fixed/rdar27830834.swift | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/Misc/misc_diagnostics.swift b/test/Misc/misc_diagnostics.swift index 6bf146ba0ff36..a8992cc0a6108 100644 --- a/test/Misc/misc_diagnostics.swift +++ b/test/Misc/misc_diagnostics.swift @@ -143,8 +143,9 @@ func test17875634() { func test20770032() { if case let 1...10 = (1, 1) { // expected-warning{{'let' pattern has no effect; sub-pattern didn't bind any variables}} {{11-15=}} // expected-error@-1 {{expression pattern of type 'ClosedRange' cannot match values of type '(Int, Int)'}} - // expected-error@-2 {{type '(Int, Int)' cannot conform to 'Equatable'; only concrete types such as structs, enums and classes can conform to protocols}} - // expected-note@-3 {{required by operator function '~=' where 'T' = '(Int, Int)'}} + // expected-error@-2 {{type '(Int, Int)' cannot conform to 'Equatable'}} + // expected-note@-3 {{only concrete types such as structs, enums and classes can conform to protocols}} + // expected-note@-4 {{required by operator function '~=' where 'T' = '(Int, Int)'}} } } diff --git a/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift b/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift index 5454c2da0b024..d17e21177e914 100644 --- a/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift +++ b/validation-test/Sema/type_checker_crashers_fixed/rdar27830834.swift @@ -1,6 +1,4 @@ -// RUN: %target-swift-frontend %s -typecheck +// RUN: not %target-swift-frontend %s -typecheck var d = [String:String]() _ = "\(d.map{ [$0 : $0] })" -// expected-error@-1 {{type 'Dictionary.Element' (aka '(key: String, value: String)') cannot conform to 'Hashable'; only concrete types such as structs, enums and classes can conform to protocols}} -// expected-note@-2 {{required by generic struct 'Dictionary' where 'Key' = 'Dictionary.Element' (aka '(key: String, value: String)')}}