[send-non-sendable] Add REQUIRES: asserts to concurrency tests that use SendNonSendable.

This commit is contained in:
Michael Gottesman
2023-08-31 19:25:19 -07:00
parent fca9db2a7e
commit b53af9419c
76 changed files with 80 additions and 25 deletions

View File

@@ -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

View File

@@ -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 {}

View File

@@ -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() {}

View File

@@ -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'}}

View File

@@ -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()

View File

@@ -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:

View File

@@ -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 }}

View File

@@ -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

View File

@@ -5,6 +5,7 @@
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: asserts
import Foundation

View File

@@ -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 {

View File

@@ -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

View File

@@ -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>?

View File

@@ -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)

View File

@@ -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 {}

View File

@@ -5,6 +5,7 @@
// REQUIRES: objc_interop
// REQUIRES: concurrency
// REQUIRES: asserts
import Foundation

View File

@@ -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

View File

@@ -5,6 +5,7 @@
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: asserts
import Foundation

View File

@@ -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) {}

View File

@@ -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

View File

@@ -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 {

View File

@@ -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

View File

@@ -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, *)

View File

@@ -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

View File

@@ -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, *)

View File

@@ -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 {

View File

@@ -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

View File

@@ -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 { "" }

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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}}

View File

@@ -3,6 +3,7 @@
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: asserts
import Foundation

View File

@@ -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 { }

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -5,6 +5,7 @@
// REQUIRES: concurrency
// REQUIRES: OS=macosx
// REQUIRES: asserts
// rdar://106849189 move-only types should be supported in freestanding mode
// UNSUPPORTED: freestanding

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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 {

View File

@@ -5,6 +5,7 @@
// REQUIRES: concurrency
// REQUIRES: libdispatch
// REQUIRES: asserts
import Dispatch

View File

@@ -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 { }

View File

@@ -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}}

View File

@@ -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) {}

View File

@@ -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

View File

@@ -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 { }

View File

@@ -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

View File

@@ -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.

View File

@@ -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 {

View File

@@ -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

View File

@@ -5,6 +5,8 @@
// REQUIRES: objc_interop
// REQUIRES: concurrency
// REQUIRES: asserts
import Foundation
import ObjCConcurrency

View File

@@ -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

View File

@@ -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> { }

View File

@@ -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}}

View File

@@ -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) { }

View File

@@ -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

View File

@@ -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}}

View File

@@ -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}}

View File

@@ -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, *)

View File

@@ -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}}

View File

@@ -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}}

View File

@@ -4,6 +4,7 @@
// REQUIRES: concurrency
// REQUIRES: OS=macosx
// REQUIRES: asserts
@preconcurrency func send(_: Sendable) { }
func sendOpt(_: Sendable?) { }

View File

@@ -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() { }

View File

@@ -5,6 +5,8 @@
// REQUIRES: objc_interop
// REQUIRES: concurrency
// REQUIRES: asserts
import Foundation
@objc protocol P: Sendable { }

View File

@@ -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}}

View File

@@ -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

View File

@@ -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 {}

View File

@@ -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}}

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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

View File

@@ -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

View File

@@ -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() {}

View File

@@ -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 { }

View File

@@ -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