mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This matches send non sendable but importantly also makes it clear that we are talking about something that doesn't conform to the Sendable protocol which is capitalized. rdar://151802975
17 lines
671 B
Swift
17 lines
671 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 5
|
|
// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution
|
|
|
|
// REQUIRES: concurrency
|
|
|
|
// https://github.com/apple/swift/issues/70019
|
|
|
|
@usableFromInline
|
|
struct Foo { // expected-note {{consider making struct 'Foo' conform to the 'Sendable' protocol}}
|
|
var integer: Int
|
|
}
|
|
|
|
struct Bar: Sendable {
|
|
// FIXME: This warning should only be thrown in library evolution mode. If @usableFromInline is removed from Foo the Sendable conformance is synthesized as expected.
|
|
var foo: Foo // expected-warning {{stored property 'foo' of 'Sendable'-conforming struct 'Bar' has non-Sendable type 'Foo'}}
|
|
}
|