Skip to content

Commit 965e5bf

Browse files
committed
More test updates for Swift 6 and Sendable
1 parent 994a601 commit 965e5bf

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/decl/protocol/special/Sendable_swift6.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
func acceptSendable<T: Sendable>(_: T) { }
66

7-
class NotSendable { }
7+
class NotSendable { } // expected-note 2{{class 'NotSendable' does not conform to the `Sendable` protocol}}
88

99
func testSendableBuiltinConformances(
1010
i: Int, ns: NotSendable, sf: @escaping @Sendable () -> Void,
@@ -23,8 +23,11 @@ func testSendableBuiltinConformances(
2323

2424
// Complaints about missing Sendable conformances
2525
acceptSendable((i, ns)) // expected-error{{type 'NotSendable' does not conform to the 'Sendable' protocol}}
26-
acceptSendable(nsf) // expected-error{{function type '() -> Void' must be marked '@Sendable' to conform to 'Sendable'}}
27-
acceptSendable((nsf, i)) // expected-error{{function type '() -> Void' must be marked '@Sendable' to conform to 'Sendable'}}
28-
acceptSendable(funNotSendable) // expected-error{{function type '() -> Void' must be marked '@Sendable' to conform to 'Sendable'}}
26+
acceptSendable(nsf) // expected-error{{type '() -> Void' does not conform to the 'Sendable' protocol}}
27+
// expected-note@-1{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
28+
acceptSendable((nsf, i)) // expected-error{{type '() -> Void' does not conform to the 'Sendable' protocol}}
29+
// expected-note@-1{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
30+
acceptSendable(funNotSendable) // expected-error{{type '() -> Void' does not conform to the 'Sendable' protocol}}
31+
// expected-note@-1{{a function type must be marked '@Sendable' to conform to 'Sendable'}}
2932
acceptSendable((i, ns)) // expected-error{{type 'NotSendable' does not conform to the 'Sendable' protocol}}
3033
}

0 commit comments

Comments
 (0)