Files
swift-mirror/test/Concurrency/issue-70019.swift
Michael Gottesman 0d519a1acb [sema] Change non-sendable -> non-Sendable in diagnostics.
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
(cherry picked from commit 3ed4059a60)
2025-05-23 10:31:05 -07:00

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'}}
}