mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
25 lines
1.2 KiB
Swift
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>
|