mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[send-non-sendable] Add REQUIRES: asserts to concurrency tests that use SendNonSendable.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -debugger-support %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This test simulates LLDB's expression evaluator making an otherwise illegal
|
||||
// synchronous call into an extension of an actor, as it would to run `p n` in
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
// some utilities
|
||||
func thrower() throws {}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// RUN: %target-swift-frontend -parse-as-library -emit-sil -enable-actor-data-race-checks -o - %s | %FileCheck %s
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
func doSomething() {}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
actor A1: Comparable {}
|
||||
// expected-error@-1 {{type 'A1' does not conform to protocol 'Comparable'}}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
protocol P: Actor {
|
||||
func f()
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix targeted-complete-sns- -verify-additional-prefix complete-sns- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// Verify that we don't allow actor-isolated state to be passed via inout
|
||||
// Check:
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// RUN: %target-swift-frontend -I %t -disable-availability-checking -warn-concurrency -parse-as-library -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable %s
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
import OtherActors // expected-remark{{add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'OtherActors'}}{{1-1=@preconcurrency }}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
public protocol P {
|
||||
associatedtype T
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: asserts
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete-sns- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@globalActor
|
||||
actor SomeGlobalActor {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class Box { // expected-note 3{{class 'Box' does not conform to the 'Sendable' protocol}}
|
||||
let size : Int = 0
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// RUN: %target-swift-frontend -I %t -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
actor foo {
|
||||
var t: Task<Void, Error>?
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
enum PictureData {
|
||||
case value(String)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
func asyncFunc(_ value: String) async {}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// RUN: %target-swift-frontend -enable-experimental-concurrency -disable-availability-checking -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable %s -verify-additional-prefix complete-and-sns-
|
||||
|
||||
// REQUIRES: concurrency
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
////
|
||||
// some functions to play with
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: asserts
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
func autoclosureCapture(_: @autoclosure () async throws -> Int) async {}
|
||||
func nonescapingCapture(_: () async throws -> Int) {}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
actor MyActor {
|
||||
let immutable: Int = 17
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@globalActor
|
||||
actor Kat {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This should pass without any warnings or errors
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// expected-note@+2{{add 'async' to function 'missingAsync' to make it asynchronous}}
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking %import-libdispatch -parse-as-library )
|
||||
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %import-libdispatch -parse-as-library -emit-sil -o /dev/null -strict-concurrency=targeted %s
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %import-libdispatch -parse-as-library -emit-sil -o /dev/null -strict-concurrency=complete %s
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %import-libdispatch -parse-as-library -emit-sil -o /dev/null -strict-concurrency=complete -enable-experimental-feature SendNonSendable %s
|
||||
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: libdispatch
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
// REQUIRES: libdispatch
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
// RUN: %target-swift-frontend -I %t -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
actor Test {
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
// RUN: %target-codesign %t/async_task_priority
|
||||
// RUN: %target-run %t/async_task_priority
|
||||
|
||||
// RUN: %target-build-swift %s -Xfrontend -disable-availability-checking -parse-as-library -o %t/async_task_priority -strict-concurrency=targeted
|
||||
// RUN: %target-build-swift %s -Xfrontend -disable-availability-checking -parse-as-library -o %t/async_task_priority -strict-concurrency=complete
|
||||
// RUN: %target-build-swift %s -Xfrontend -disable-availability-checking -parse-as-library -o %t/async_task_priority -strict-concurrency=complete -Xfrontend -enable-experimental-feature -Xfrontend SendNonSendable
|
||||
|
||||
// REQUIRES: VENDOR=apple
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: concurrency
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// RUN: %target-swift-frontend -strict-concurrency=strict -disable-availability-checking %s -o /dev/null -verify -emit-sil -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
func someAsyncFunc() async -> String { "" }
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// These tests cover various interactions with async functions that are
|
||||
// either throws or rethrows.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// https://github.com/apple/swift/issues/60276
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// RUN: %target-swift-frontend -I %t -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
import ShadowsConcur
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// RUN: %target-swift-frontend -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class GlobalCounter {
|
||||
var counter: Int = 0
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class NotConcurrent { } // expected-note 16{{class 'NotConcurrent' does not conform to the 'Sendable' protocol}}
|
||||
// expected-complete-note @-1 11{{class 'NotConcurrent' does not conform to the 'Sendable' protocol}}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: asserts
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// RUN: %target-swift-frontend -enable-library-evolution -warn-concurrency %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class C1 { } // expected-note {{class 'C1' does not conform to the 'Sendable' protocol}}
|
||||
final class C2: Sendable { }
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// RUN: %target-swift-frontend -enable-infer-public-sendable %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
|
||||
// RUN: %target-swift-frontend -enable-infer-public-sendable %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
func acceptCV<T: Sendable>(_: T) { }
|
||||
|
||||
public struct PublicStruct {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -enable-experimental-flow-sensitive-concurrent-captures -verify -emit-sil %s -o - >/dev/null -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
func f(_: @escaping @Sendable () -> Void) { }
|
||||
open class F {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: OS=macosx
|
||||
// REQUIRES: asserts
|
||||
|
||||
// rdar://106849189 move-only types should be supported in freestanding mode
|
||||
// UNSUPPORTED: freestanding
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable %s
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// rdar://106849189 move-only types should be supported in freestanding mode
|
||||
// UNSUPPORTED: freestanding
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable %s
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// rdar://106849189 move-only types should be supported in freestanding mode
|
||||
// UNSUPPORTED: freestanding
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -emit-sil %s -disable-availability-checking -strict-concurrency=complete -enable-experimental-feature SendNonSendable | %FileCheck %s
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
actor A {
|
||||
var x: String = "Hello"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@MainActor
|
||||
struct X1: Equatable, Hashable, Codable {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: libdispatch
|
||||
// REQUIRES: asserts
|
||||
|
||||
import Dispatch
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -parse-as-library -enable-experimental-feature StrictConcurrency=complete -enable-experimental-feature GlobalConcurrency -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable %s
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class C1 { } // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}}
|
||||
class C2 { }
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class C { // expected-note {{class 'C' does not conform to the 'Sendable' protocol}}
|
||||
// expected-complete-note @-1 {{class 'C' does not conform to the 'Sendable' protocol}}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// RUN: %target-swift-frontend -strict-concurrency=complete -swift-version 5 -parse-as-library -emit-sil -verify %s
|
||||
// RUN: %target-swift-frontend -strict-concurrency=complete -swift-version 5 -parse-as-library -emit-sil -verify %s -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
func randomBool() -> Bool { return false }
|
||||
func logTransaction(_ i: Int) {}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify-additional-prefix complete-and-sns- -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// provides coverage for rdar://71548470
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable -verify-additional-prefix complete-sns-
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
actor SomeActor { }
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// RUN: %target-swift-frontend -I %t -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable -verify-additional-prefix complete-sns-
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
import other_global_actor_inference
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -emit-sil -verify -o /dev/null %s -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// Check that the inserted hop-to-executor instructions don't cause a false
|
||||
// "unreachable code" warning.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -warn-concurrency %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
actor A {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// https://github.com/apple/swift/issues/57376
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
import Foundation
|
||||
import ObjCConcurrency
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -I %t -enable-library-evolution -swift-version 5 -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable %s
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@_implementationOnly import ImplementationOnlyDefs
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -o /dev/null -verify %s -verify-additional-prefix complete-and-sns- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
// https://github.com/apple/swift/issues/59909
|
||||
struct Future<T> { }
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -o /dev/null -verify %s -verify-additional-prefix complete-sns- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@preconcurrency @MainActor func f() { }
|
||||
// expected-note @-1 2{{calls to global function 'f()' from outside of its actor context are implicitly asynchronous}}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable -verify-additional-prefix complete-sns-
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@preconcurrency func unsafelySendableClosure(_ closure: @Sendable () -> Void) { }
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -enable-experimental-concurrency -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
//// Basic definitions and parsing
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// RUN: %target-swift-frontend -require-explicit-sendable -warn-concurrency %s -emit-sil -o /dev/null -verify
|
||||
// RUN: %target-swift-frontend -require-explicit-sendable -warn-concurrency %s -emit-sil -o /dev/null -verify -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
public protocol P { }
|
||||
|
||||
// expected-note@+2{{consider making struct 'S1' conform to the 'Sendable' protocol}}{{18-18=: Sendable}}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// RUN: %target-swift-frontend -strict-concurrency=complete -enable-experimental-feature SendNonSendable -emit-sil -o /dev/null %s -verify
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class C1 { } // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}}
|
||||
@_nonSendable class C2 { } // expected-note{{conformance of 'C2' to 'Sendable' has been explicitly marked unavailable here}}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// RUN: %target-swift-frontend -verify -strict-concurrency=complete -verify-additional-prefix sns- -verify-additional-prefix complete-and-sns- -emit-sil -o /dev/null %s -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify -verify-additional-prefix complete-and-sns- -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
class NotSendable { // expected-note 9{{class 'NotSendable' does not conform to the 'Sendable' protocol}}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend %S/Inputs/sendable_cycle_other.swift -disable-availability-checking %s -verify -emit-sil -o /dev/null -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
struct Bar {
|
||||
lazy var foo = { // expected-error {{escaping closure captures mutating 'self' parameter}}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: OS=macosx
|
||||
// REQUIRES: asserts
|
||||
|
||||
@preconcurrency func send(_: Sendable) { }
|
||||
func sendOpt(_: Sendable?) { }
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -o /dev/null -verify %s -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
@Sendable func globalFunc() { }
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
// REQUIRES: objc_interop
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
import Foundation
|
||||
|
||||
@objc protocol P: Sendable { }
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -verify -emit-sil -o /dev/null %s -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
class NotSendable { // expected-note 2{{class 'NotSendable' does not conform to the 'Sendable' protocol}}
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking -I %t -verify -emit-sil %s -o /dev/null -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@preconcurrency import NonStrictModule
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// RUN: %target-swift-frontend -o /dev/null -emit-sil %s -verify -strict-concurrency=complete
|
||||
// RUN: %target-swift-frontend -o /dev/null -emit-sil %s -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
// This triggers a conformance check with SuppressDiagnostics=true.
|
||||
let x = S().f {}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -strict-concurrency=complete -verify-additional-prefix targeted- -enable-experimental-feature SendNonSendable -o /dev/null -emit-sil %s -verify
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
class C1 { }
|
||||
// expected-note @-1 {{class 'C1' does not conform to the 'Sendable' protocol}}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
// RUN: %target-swift-frontend -strict-concurrency=complete -disable-availability-checking -emit-sil -verify -o /dev/null %s -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
struct TL {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
@available(SwiftStdlib 5.1, *)
|
||||
func test_taskGroup_cancelAll() async {
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
// RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking -parse-as-library)
|
||||
|
||||
// Shouldn't see any warnings/etc
|
||||
// RUN: %target-swift-frontend -verify -disable-availability-checking -parse-as-library -emit-sil -o /dev/null %s
|
||||
// RUN: %target-swift-frontend -verify -disable-availability-checking -parse-as-library -emit-sil -o /dev/null %s -strict-concurrency=targeted
|
||||
// RUN: %target-swift-frontend -verify -disable-availability-checking -parse-as-library -emit-sil -o /dev/null %s -strict-concurrency=complete
|
||||
// RUN: %target-swift-frontend -verify -disable-availability-checking -parse-as-library -emit-sil -o /dev/null %s -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: concurrency
|
||||
// UNSUPPORTED: freestanding
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
// RUN: %target-swift-frontend -verify -I %t %s -emit-sil -o /dev/null -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: concurrency
|
||||
// REQUIRES: asserts
|
||||
|
||||
import UnavailableFunction
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -o /dev/null -verify -disable-availability-checking %s -strict-concurrency=complete
|
||||
// RUN: %target-swift-frontend -emit-sil -o /dev/null -verify -disable-availability-checking %s -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
// expected-error @+1 {{non-async functions cannot inherit an executor}}
|
||||
@_unsafeInheritExecutor
|
||||
func testNonAsync() {}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// RUN: %target-swift-frontend -emit-sil -verify -o /dev/null -disable-availability-checking %s -strict-concurrency=complete
|
||||
// RUN: %target-swift-frontend -emit-sil -verify -o /dev/null -disable-availability-checking %s -strict-concurrency=complete -enable-experimental-feature SendNonSendable
|
||||
|
||||
// REQUIRES: asserts
|
||||
|
||||
actor A {
|
||||
func g() { }
|
||||
func h() throws { }
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
// RUN: %target-codesign %t/voucher_propagation
|
||||
// RUN: MallocStackLogging=1 %target-run %t/voucher_propagation
|
||||
|
||||
// RUN: %target-swift-frontend %s -emit-sil -disable-availability-checking -o /dev/null -strict-concurrency=targeted -verify
|
||||
// RUN: %target-swift-frontend %s -emit-sil -disable-availability-checking -o /dev/null -strict-concurrency=complete -verify -verify-additional-prefix complete-sns-
|
||||
// RUN: %target-swift-frontend %s -emit-sil -disable-availability-checking -o /dev/null -strict-concurrency=complete -enable-experimental-feature SendNonSendable -verify -verify-additional-prefix complete-sns-
|
||||
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: concurrency
|
||||
|
||||
|
||||
Reference in New Issue
Block a user