Skip to content

Commit e966c6a

Browse files
committed
[NFC][RequirementMachine] Fix duplicate diagnostics in requirement machine
tests.
1 parent 1dddd9c commit e966c6a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/Generics/requirement_machine_diagnostics.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ func badTypeConformance2<T>(_: T) where T.Blarg : EqualComparable { } // expecte
3333
func badTypeConformance3<T>(_: T) where (T) -> () : EqualComparable { }
3434
// expected-error@-1{{type '(T) -> ()' in conformance requirement does not refer to a generic parameter or associated type}}
3535

36-
func badTypeConformance4<T>(_: T) where @escaping (inout T) throws -> () : EqualComparable { }
36+
func badTypeConformance4<T>(_: T) where (inout T) throws -> () : EqualComparable { }
3737
// expected-error@-1{{type '(inout T) throws -> ()' in conformance requirement does not refer to a generic parameter or associated type}}
38-
// expected-error@-2 2 {{@escaping attribute may only be used in function parameter position}}
3938

4039
func badTypeConformance5<T>(_: T) where T & Sequence : EqualComparable { }
41-
// expected-error@-1 2 {{non-protocol, non-class type 'T' cannot be used within a protocol-constrained type}}
42-
// expected-error@-2{{type 'Sequence' in conformance requirement does not refer to a generic parameter or associated type}}
40+
// expected-error@-1 {{non-protocol, non-class type 'T' cannot be used within a protocol-constrained type}}
4341

4442
func badTypeConformance6<T>(_: T) where [T] : Collection { }
4543
// expected-warning@-1{{redundant conformance constraint '[T]' : 'Collection'}}

0 commit comments

Comments
 (0)