mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Always run explicit `Sendable` checks on public types and suppress warning printing by default instead of using a special compiler argument. Resolves: rdar://162394810
17 lines
910 B
Swift
17 lines
910 B
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 -Wwarning ExplicitSendable
|
|
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil -o /dev/null -I %S/Inputs/custom-modules %s -verify -parse-as-library -Wwarning ExplicitSendable -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 -Wwarning ExplicitSendable -strict-concurrency=complete
|
|
|
|
// REQUIRES: objc_interop
|
|
// REQUIRES: concurrency
|
|
|
|
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}}
|