Skip to content

Commit 6843e03

Browse files
authored
Merge pull request #70020 from WindowsMEMZ/70019-test
Add test case for #70019
2 parents 6ad21e5 + 87b0371 commit 6843e03

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/Concurrency/issue-70019.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: %target-typecheck-verify-swift -swift-version 5
2+
// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution
3+
4+
// REQUIRES: concurrency
5+
6+
// https://github.com/apple/swift/issues/70019
7+
8+
@usableFromInline
9+
struct Foo { // expected-note {{consider making struct 'Foo' conform to the 'Sendable' protocol}}
10+
var integer: Int
11+
}
12+
13+
struct Bar: Sendable {
14+
// FIXME: This warning should only be thrown in library evolution mode. If @usableFromInline is removed from Foo the Sendable conformance is synthesized as expected.
15+
var foo: Foo // expected-warning {{stored property 'foo' of 'Sendable'-conforming struct 'Bar' has non-sendable type 'Foo'}}
16+
}

0 commit comments

Comments
 (0)