Files
swift-mirror/test/Concurrency/redundant_sendable_conformance.swift
Henrik G. Olsson cbc0ec3b88 Add -verify-ignore-unrelated where necessary (NFC)
These are tests that fail in the next commit without this flag. This
does not add -verify-ignore-unrelated to all tests with -verify, only
the ones that would fail without it. This is NFC since this flag is
currently a no-op.
2025-10-04 14:19:52 -07:00

25 lines
1.2 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/SendableConformances.swiftmodule -module-name SendableConformances %S/Inputs/SendableConformances.swift
// RUN: %target-swift-frontend -typecheck %s -verify -verify-ignore-unrelated -swift-version 6 -I %t
// REQUIRES: concurrency
import SendableConformances
typealias RequireSendable<T: Sendable> = T
extension NonSendableClass: @retroactive @unchecked Sendable {}
// expected-warning@-1 {{conformance of 'NonSendableClass' to protocol 'Sendable' was already stated in the type's module 'SendableConformances'}}
typealias CheckNonSendableClass = RequireSendable<NonSendableClass>
extension SendableStruct: @retroactive @unchecked Sendable {}
// expected-warning@-1 {{conformance of 'SendableStruct' to protocol 'Sendable' was already stated in the type's module 'SendableConformances'}}
@available(*, unavailable)
extension AnotherSendableStruct: @retroactive @unchecked Sendable {}
// expected-warning@-1 {{conformance of 'AnotherSendableStruct' to protocol 'Sendable' was already stated in the type's module 'SendableConformances'}}
typealias CheckAnotherSendableStruct = RequireSendable<AnotherSendableStruct>