Skip to content

Commit b4976df

Browse files
committed
[Diagnostics] Adjust missing conformance note to use ':' instead of '=='
1 parent 0572b35 commit b4976df

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

include/swift/AST/DiagnosticsSema.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1988,7 +1988,7 @@ NOTE(wrapped_type_satisfies_requirement,none,
19881988
"wrapped type %0 satisfies this requirement; did you mean to unwrap?", (Type))
19891989
NOTE(candidate_types_conformance_requirement,none,
19901990
"candidate requires that %0 conform to %1 "
1991-
"(requirement specified as %2 == %3%4)",
1991+
"(requirement specified as %2 : %3%4)",
19921992
(Type, Type, Type, Type, StringRef))
19931993
NOTE(candidate_types_equal_requirement,none,
19941994
"candidate requires that the types %0 and %1 be equivalent "

test/Constraints/diagnostics.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ func f11<T : P2>(_ n: T, _ f: @escaping (T) -> T) {} // expected-note {{where '
12541254
f11(3, f4) // expected-error {{global function 'f11' requires that 'Int' conform to 'P2'}}
12551255

12561256
let f12: (Int) -> Void = { _ in } // expected-note {{candidate '(Int) -> Void' requires 1 argument, but 2 were provided}}
1257-
func f12<T : P2>(_ n: T, _ f: @escaping (T) -> T) {} // expected-note {{candidate requires that 'Int' conform to 'P2' (requirement specified as 'T' == 'P2')}}
1257+
func f12<T : P2>(_ n: T, _ f: @escaping (T) -> T) {} // expected-note {{candidate requires that 'Int' conform to 'P2' (requirement specified as 'T' : 'P2')}}
12581258
f12(3, f4)// expected-error {{no exact matches in call to global function 'f12'}}
12591259

12601260
// SR-12242

test/decl/ext/protocol.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ extension AnotherBazProtocol where BazValue: AnotherBazProtocol {} // ok, does n
197197
// Protocol extensions with additional requirements
198198
// ----------------------------------------------------------------------------
199199
extension P4 where Self.AssocP4 : P1 {
200-
// expected-note@-1 {{candidate requires that 'Int' conform to 'P1' (requirement specified as 'Self.AssocP4' == 'P1')}}
201-
// expected-note@-2 {{candidate requires that 'S4aHelper' conform to 'P1' (requirement specified as 'Self.AssocP4' == 'P1')}}
200+
// expected-note@-1 {{candidate requires that 'Int' conform to 'P1' (requirement specified as 'Self.AssocP4' : 'P1')}}
201+
// expected-note@-2 {{candidate requires that 'S4aHelper' conform to 'P1' (requirement specified as 'Self.AssocP4' : 'P1')}}
202202
func extP4a() {
203203
acceptsP1(reqP4a())
204204
}

0 commit comments

Comments
 (0)