Skip to content

Commit 3b8e384

Browse files
committed
Fix another test.
Importantly since this test had a typechecker error within it, we do not get return value diagnostics anymore since that occurs now at SIL time.
1 parent 72acb3d commit 3b8e384

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/Sema/moveonly_sendable.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ enum MaybeFile: ~Copyable { // should implicitly conform
1616
case closed
1717
}
1818

19-
struct NotSendableMO: ~Copyable { // expected-note {{consider making struct 'NotSendableMO' conform to the 'Sendable' protocol}}
20-
// expected-complete-note @-1 {{consider making struct 'NotSendableMO' conform to the 'Sendable' protocol}}
19+
struct NotSendableMO: ~Copyable {
2120
var ref: Ref
2221
}
2322

@@ -48,8 +47,8 @@ func processFiles(_ a: A, _ anotherFile: borrowing FileDescriptor) async {
4847
await a.takeMaybeFile(.available(anotherFile))
4948
_ = A(.available(anotherFile))
5049

51-
let ns = await a.getRef() // expected-warning {{non-sendable result type 'NotSendableMO' cannot be sent from actor-isolated context in call to instance method 'getRef()'}}
52-
await takeNotSendable(ns) // expected-complete-warning {{passing argument of non-sendable type 'NotSendableMO' outside of main actor-isolated context may introduce data races}}
50+
let ns = await a.getRef()
51+
await takeNotSendable(ns)
5352

5453
switch (await a.giveFileDescriptor()) {
5554
case let .available(fd):

0 commit comments

Comments
 (0)