mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
To make the tests pass, I had to teach sil-opt how to setup upcoming features since it did not know how to parse them. rdar://124100266
20 lines
1.3 KiB
Swift
20 lines
1.3 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: asserts
|
|
|
|
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{{add '@unchecked Sendable' conformance to class 'Z' if this type manually implements concurrency safety}}
|
|
// expected-note@-2{{make class 'Z' explicitly non-Sendable to suppress this warning}}
|