Files
swift-mirror/test/Concurrency/objc_require_explicit_sendable.swift
Doug Gregor a922e8e356 Remove the note that suggests using @unchecked
`@unchecked Sendble` is dangerous, and almost always the wrong thing to
use. Don't have the compiler suggest it.
2025-05-23 09:12:51 +01:00

19 lines
1.2 KiB
Swift

// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -o /dev/null -I %S/Inputs/custom-modules %s -verify -parse-as-library -require-explicit-sendable
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -o /dev/null -I %S/Inputs/custom-modules %s -verify -parse-as-library -require-explicit-sendable -strict-concurrency=targeted
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -o /dev/null -I %S/Inputs/custom-modules %s -verify -parse-as-library -require-explicit-sendable -strict-concurrency=complete
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -o /dev/null -I %S/Inputs/custom-modules %s -verify -parse-as-library -require-explicit-sendable -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: objc_interop
// REQUIRES: concurrency
// REQUIRES: swift_feature_RegionBasedIsolation
import Foundation
import ObjCConcurrency
open class X: NXView { }
open class Y: X { }
open class Z: NSObject { } // expected-warning{{public class 'Z' does not specify whether it is 'Sendable' or not}}
// expected-note@-1{{make class 'Z' explicitly non-Sendable to suppress this warning}}