[test] Mark tests that use experimental/upcoming features as such

Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
This commit is contained in:
Daniel Rodríguez Troitiño
2024-09-25 23:08:59 -07:00
parent facdb57f39
commit ba68faaed5
727 changed files with 1047 additions and 297 deletions

View File

@@ -12,9 +12,8 @@
// REQUIRES: executable_test
// REQUIRES: swift_swift_parser
// REQUIRES: swift_feature_ParserASTGen
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -13,9 +13,10 @@
// REQUIRES: executable_test
// REQUIRES: swift_swift_parser
// REQUIRES: swift_feature_ParserASTGen
// REQUIRES: swift_feature_SwiftParser
// REQUIRES: swift_feature_ValueGenerics
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -12,8 +12,7 @@
// RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-bare-slash-regex -enable-experimental-feature ParserASTGen
// REQUIRES: swift_swift_parser
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// REQUIRES: swift_feature_ParserASTGen
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -12,8 +12,8 @@
// RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature DoExpressions -enable-experimental-feature ParserASTGen
// REQUIRES: swift_swift_parser
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// REQUIRES: swift_feature_DoExpressions
// REQUIRES: swift_feature_ParserASTGen
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -13,9 +13,9 @@
// REQUIRES: executable_test
// REQUIRES: swift_swift_parser
// REQUIRES: swift_feature_ParserASTGen
// REQUIRES: swift_feature_SwiftParser
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -1,6 +1,6 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -DDISCARDABLE -DNONSENDABLE -swift-version 6
/// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// REQUIRES: swift_feature_ParserASTGen
#if NOT_SET
func f { } // expected-error{{expected parameter clause in function signature}}

View File

@@ -1,8 +1,7 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -D CONDITION_1
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// REQUIRES: swift_swift_parser
// REQUIRES: swift_feature_ParserASTGen
postfix operator ++
postfix func ++ (_: Int) -> Int { 0 }

View File

@@ -1,4 +1,5 @@
// REQUIRES: swift_swift_parser, asserts
// REQUIRES: swift_feature_ParserASTGen
// RUN: %empty-directory(%t)

View File

@@ -11,9 +11,8 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -enable-bare-slash-regex -disable-availability-checking
// REQUIRES: swift_swift_parser
// REQUIRES: swift_feature_ParserASTGen
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -12,9 +12,10 @@
// REQUIRES: executable_test
// REQUIRES: swift_swift_parser
// REQUIRES: swift_feature_ParserASTGen
// REQUIRES: swift_feature_SwiftParser
// REQUIRES: swift_feature_ThenStatements
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -8,8 +8,8 @@
// RUN: %diff -u %t/astgen.ast %t/cpp-parser.ast
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// REQUIRES: swift_feature_ParserASTGen
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -1,7 +1,7 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen
// -enable-experimental-feature requires an asserts build
// REQUIRES: asserts
// REQUIRES: swift_feature_ParserASTGen
// rdar://116686158
// UNSUPPORTED: asan

View File

@@ -1,6 +1,6 @@
// RUN: %target-typecheck-verify-swift -enable-experimental-feature TupleConformances
// REQUIRES: asserts
// REQUIRES: swift_feature_TupleConformances
typealias Tuple<each T> = (repeat each T)

View File

@@ -40,6 +40,9 @@
// RUN: -cache-replay-prefix-map /^tmp=%t \
// RUN: /^tmp/main.swift @%t/MyApp.cmd 2>&1 | %FileCheck %s --check-prefix CHECK-BLOCKED
// REQUIRES: swift_feature_LayoutStringValueWitnesses
// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation
// CHECK-BLOCKED: note: Layout string value witnesses have been disabled for module 'Test' through block list entry
// CHECK-BLOCKED-NOT: type_layout_string

View File

@@ -4,9 +4,9 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-availability-checking -enable-upcoming-feature DynamicActorIsolation -emit-silgen -module-name preconcurrency_conformances %t/src/checks.swift | %FileCheck %t/src/checks.swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-availability-checking -swift-version 6 -disable-dynamic-actor-isolation -emit-silgen -module-name preconcurrency_conformances %t/src/checks_disabled.swift | %FileCheck %t/src/checks_disabled.swift
// REQUIRES: asserts
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: swift_feature_DynamicActorIsolation
//--- checks.swift
import Foundation

View File

@@ -10,6 +10,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
// Verify that Clang declarations referencing either of the forward declares types "ForwardDeclaredInterface" or
// "ForwardDeclaredProtocol" are usable from Swift.

View File

@@ -8,6 +8,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: OS=macosx
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
import Foundation
import IncompleteTypeLibrary1

View File

@@ -1,6 +1,7 @@
// RUN: %target-swift-frontend -import-objc-header %S/Inputs/incomplete_objc_types_bridging_header.h -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
let foo = CFunctionReturningAForwardDeclaredInterface()
CFunctionTakingAForwardDeclaredInterface(foo)

View File

@@ -11,6 +11,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
// "ForwardDeclaredInterface" and "ForwardDeclaredProtocol" are forward declared in IncompleteTypeLibrary1/2, and
// completely declared in CompleteTypes. This test verifies that instances of the complete types can be passed

View File

@@ -9,6 +9,7 @@
// REQUIRES: executable_test
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
//--- full_definition.swift

View File

@@ -5,6 +5,7 @@
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %t/incomplete_definition.swift %t/full_definition.swift -diagnostic-style llvm 2>&1 | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
//--- full_definition.swift

View File

@@ -11,6 +11,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
// Both libraries "IncompleteTypeConsumer1" and "IncompleteTypeConsumer2" forward declare an interface "ForwardDeclaredInterface"
// and a protocol "ForwardDeclaredProtocol". This test verifies that the synthesized Swift declaration created to represent

View File

@@ -7,6 +7,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: swift_feature_ImportObjCForwardDeclarations
import IncompleteTypeLibrary1
import CompleteTypes

View File

@@ -2,6 +2,7 @@
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s -diagnostic-style llvm 2>&1 | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
import IncompleteTypeLibrary1
import IncompleteNoRootTypeProtocolLibrary

View File

@@ -2,6 +2,7 @@
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
import IncompleteTypeLibrary1

View File

@@ -9,6 +9,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
// Verify that a forward declared protocol not inheriting from NSObject is usable
// from Swift, if cumbersome

View File

@@ -9,6 +9,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
// Verify that a forward declared interface for a type inheriting from NSProxy instead
// of NSObject is still usable from Swift.

View File

@@ -4,6 +4,7 @@
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
import CompleteSwiftTypes
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

View File

@@ -4,6 +4,7 @@
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
@_implementationOnly import CompleteSwiftTypes
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

View File

@@ -4,6 +4,7 @@
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
import CompleteSwiftTypes
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

View File

@@ -6,6 +6,7 @@
// REQUIRES: objc_interop
// REQUIRES: executable_test
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
import CompleteSwiftTypes
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

View File

@@ -11,6 +11,7 @@
// RUN: -enable-objc-interop -swift-version 6 -source-filename x | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
// CHECK: import Foundation
// CHECK: @available(*, unavailable, message: "This Objective-C class has only been forward-declared; import its owning module to use it")

View File

@@ -2,7 +2,7 @@
// REQUIRES: objc_interop
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_SendableCompletionHandlers
import Foundation
import ObjCConcurrency

View File

@@ -2,6 +2,8 @@
// RUN: %target-swift-frontend -emit-module -o %t -I %S/Inputs/custom-modules -enable-objc-interop %s
// RUN: %target-swift-ide-test -print-module -module-to-print objc_forward_declarations -I %t -I %S/Inputs/custom-modules -enable-objc-interop -enable-upcoming-feature ImportObjcForwardDeclarations -source-filename x | %FileCheck %s
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
// CHECK: class Innocuous : Confusing {
import ForwardDeclarationsHelper

View File

@@ -1,7 +1,7 @@
// RUN: %target-swift-frontend -swift-version 6 -disable-availability-checking -emit-sil -o /dev/null %s -parse-as-library -enable-experimental-feature SendingArgsAndResults -verify -import-objc-header %S/Inputs/sending.h
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_SendingArgsAndResults
////////////////////////
// MARK: Declarations //

View File

@@ -3,6 +3,7 @@
// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: swift_feature_RegionBasedIsolation
import StdlibUnittest

View File

@@ -4,6 +4,7 @@
// REQUIRES: libdispatch
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime
// REQUIRES: swift_feature_IsolatedDeinit
// UNSUPPORTED: back_deployment_runtime
import _Concurrency

View File

@@ -4,6 +4,7 @@
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime
// REQUIRES: swift_feature_IsolatedDeinit
// UNSUPPORTED: back_deployment_runtime
// Compiler crashes because builtin "ifdef_SWIFT_STDLIB_PRINT_DISABLED"() gets lowered as "i32 0",

View File

@@ -7,6 +7,7 @@
// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime
// REQUIRES: swift_feature_IsolatedDeinit
// UNSUPPORTED: back_deployment_runtime
import Swift
@@ -87,14 +88,14 @@ class Probe {
var probeExpectedExecutor: UnownedSerialExecutor
let probeExpectedNumber: Int
let probeGroup: DispatchGroup
init(expectedNumber: Int, group: DispatchGroup) {
self.probeExpectedExecutor = AnotherActor.shared.unownedExecutor
self.probeExpectedNumber = expectedNumber
self.probeGroup = group
group.enter()
}
deinit {
expectTrue(isCurrentExecutor(probeExpectedExecutor))
expectEqual(probeExpectedNumber, TL.number)
@@ -148,7 +149,7 @@ if #available(SwiftStdlib 5.1, *) {
}
group.wait()
}
tests.test("class sync slow path") {
let group = DispatchGroup()
group.enter(1)

View File

@@ -3,6 +3,7 @@
// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: concurrency_runtime
// REQUIRES: swift_feature_IsolatedDeinit
var isDead: Bool = false

View File

@@ -1,7 +1,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature InferSendableFromCaptures -parse-as-library %s -emit-sil -o /dev/null -verify
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_InferSendableFromCaptures
// some utilities
func thrower() throws {}

View File

@@ -6,7 +6,7 @@
// RUN: %target-swift-frontend -parse-as-library -emit-sil -enable-actor-data-race-checks -o - %s | %FileCheck %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
func doSomething() {}

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
actor A1: Comparable {}
// expected-error@-1 {{type 'A1' does not conform to protocol 'Comparable'}}

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
protocol P: Actor {
func f()

View File

@@ -6,7 +6,7 @@
// RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-upcoming-feature GlobalActorIsolatedTypesUsability %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability
import GlobalVariables
import OtherActors // expected-warning{{add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'OtherActors'}}{{1-1=@preconcurrency }}

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
public protocol P {
associatedtype T

View File

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

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete-tns- -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
@globalActor
actor SomeGlobalActor {

View File

@@ -2,7 +2,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
class Box {
let size : Int = 0

View File

@@ -5,7 +5,7 @@
// RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
actor Foo {
var t: Task<Void, Error>?

View File

@@ -1,7 +1,7 @@
// RUN: %target-swift-frontend -swift-version 6 -emit-silgen -enable-experimental-feature UnspecifiedMeansMainActorIsolated %s | %FileCheck %s
// RUN: %target-swift-frontend -swift-version 6 -emit-sil -enable-experimental-feature UnspecifiedMeansMainActorIsolated %s -verify
// REQUIRES: asserts
// REQUIRES: swift_feature_UnspecifiedMeansMainActorIsolated
// READ THIS! This test is meant to FileCheck the specific isolation when
// UnspecifiedMeansMainActorIsolated is enabled. Please do not put other types

View File

@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -swift-version 6 -emit-sil -enable-experimental-feature UnspecifiedMeansMainActorIsolated %s -verify
// REQUIRES: asserts
// REQUIRES: swift_feature_UnspecifiedMeansMainActorIsolated
// READ THIS! This test is meant to check the specific isolation when
// UnspecifiedMeansMainActorIsolated is enabled in combination with validating

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
func asyncFunc(_ value: String) async {}

View File

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

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -enable-experimental-concurrency -target %target-swift-5.1-abi-triple -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation %s -verify-additional-prefix complete-and-tns-
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
////
// some functions to play with

View File

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

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
func autoclosureCapture(_: @autoclosure () async throws -> Int) async {}
func nonescapingCapture(_: () async throws -> Int) {}

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
@globalActor
actor Kat {

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// This should pass without any warnings or errors

View File

@@ -1,8 +1,8 @@
// RUN: %target-swift-frontend -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: libdispatch
// REQUIRES: swift_feature_RegionBasedIsolation
@MainActor
class MyActor {

View File

@@ -4,8 +4,8 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: libdispatch
// REQUIRES: swift_feature_RegionBasedIsolation
@available(SwiftStdlib 5.1, *)
@rethrows

View File

@@ -5,7 +5,7 @@
// RUN: %target-swift-frontend -I %t -plugin-path %swift-plugin-dir -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
actor Test {

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// These tests cover various interactions with async functions that are
// either throws or rethrows.

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// https://github.com/apple/swift/issues/60276

View File

@@ -1,7 +1,7 @@
// RUN: %target-swift-frontend -dump-ast %s -target %target-swift-5.1-abi-triple -enable-experimental-feature ClosureIsolation | %FileCheck %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_ClosureIsolation
func acceptClosure<T>(_: () -> T) { }
func acceptSendableClosure<T>(_: @Sendable () -> T) { }

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-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
import ShadowsConcur

View File

@@ -2,7 +2,7 @@
// RUN: %target-swift-frontend -enable-library-evolution -strict-concurrency=complete %s -emit-sil -o /dev/null -verify -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
class C1 { } // expected-note {{class 'C1' does not conform to the 'Sendable' protocol}}
final class C2: Sendable { }

View File

@@ -3,7 +3,7 @@
// 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-upcoming-feature RegionBasedIsolation
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
func acceptCV<T: Sendable>(_: T) { }

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -print-diagnostic-groups -target %target-swift-5.1-abi-triple -enable-experimental-flow-sensitive-concurrent-captures -verify -emit-sil %s -o - >/dev/null -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
func f(_: @escaping @Sendable () -> Void) { }
open class F {

View File

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

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// rdar://106849189 move-only types should be supported in freestanding mode
// UNSUPPORTED: freestanding

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -print-diagnostic-groups -disable-availability-checking -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// rdar://106849189 move-only types should be supported in freestanding mode
// UNSUPPORTED: freestanding

View File

@@ -4,8 +4,8 @@
// RUN: %target-swift-frontend -emit-sil %s -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation | %FileCheck %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_in_compiler
// REQUIRES: swift_feature_RegionBasedIsolation
actor A {
var x: String = "Hello"

View File

@@ -3,6 +3,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -parse-as-library -enable-experimental-feature IsolatedDeinit -emit-silgen -DSILGEN %s | %FileCheck -check-prefix=CHECK-SYMB %s
// REQUIRES: concurrency
// REQUIRES: swift_feature_IsolatedDeinit
// Fixtures

View File

@@ -16,6 +16,7 @@
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: swift_feature_IsolatedDeinit
// Note: intentionally importing Alpha implicitly
import Beta

View File

@@ -1,5 +1,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -enable-experimental-feature IsolatedDeinit -parse-as-library -emit-silgen -verify %s
// REQUIRES: swift_feature_IsolatedDeinit
@globalActor final actor FirstActor {
static let shared = FirstActor()
}

View File

@@ -4,6 +4,7 @@
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: swift_feature_IsolatedDeinit
import Foundation

View File

@@ -1,5 +1,7 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-experimental-feature IsolatedDeinit -emit-ir %s | %FileCheck %s
// REQUIRES: swift_feature_IsolatedDeinit
public class Foo {
@MainActor
deinit {}

View File

@@ -2,7 +2,8 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -enable-upcoming-feature GlobalActorIsolatedTypesUsability
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability
// REQUIRES: swift_feature_RegionBasedIsolation
@MainActor
struct X1: Equatable, Hashable, Codable {

View File

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

View File

@@ -26,8 +26,8 @@
// RUN: -enable-upcoming-feature DynamicActorIsolation \
// RUN: %t/src/Client.swift -verify | %FileCheck %s
// REQUIRES: asserts
// REQUIRES: concurrency
// REQUIRES: swift_feature_DynamicActorIsolation
//--- API.swift
public func compute<T>(_: ((T) -> Void)?) {}

View File

@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -target arm64-apple-macosx10.15 -enable-upcoming-feature DynamicActorIsolation -emit-silgen -verify %s | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: asserts
// REQUIRES: swift_feature_DynamicActorIsolation
import Foundation

View File

@@ -3,7 +3,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -enable-upcoming-feature StrictConcurrency -emit-sil -o /dev/null -verify %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_StrictConcurrency
class C1 { } // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}}
class C2 { }

View File

@@ -3,7 +3,8 @@
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -verify-additional-prefix complete- -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// REQUIRES: swift_feature_StrictConcurrency
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,9 @@
// RUN: %target-swift-frontend -enable-experimental-feature IsolatedDeinit -strict-concurrency=complete -swift-version 5 -parse-as-library -emit-sil -verify %s
// RUN: %target-swift-frontend -enable-experimental-feature IsolatedDeinit -strict-concurrency=complete -swift-version 5 -parse-as-library -emit-sil -verify %s -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: swift_feature_RegionBasedIsolation
// REQUIRES: swift_feature_IsolatedDeinit
func randomBool() -> Bool { return false }
func logTransaction(_ i: Int) {}

View File

@@ -7,7 +7,8 @@
// RUN: %target-swift-frontend -I %t -disable-availability-checking %s -emit-sil -o /dev/null -verify -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation -verify-additional-prefix complete-tns- -enable-upcoming-feature GlobalActorIsolatedTypesUsability
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability
// REQUIRES: swift_feature_RegionBasedIsolation
import other_global_actor_inference

View File

@@ -1,7 +1,8 @@
// RUN: %target-typecheck-verify-swift -strict-concurrency=complete -target %target-swift-5.1-abi-triple -enable-upcoming-feature RegionBasedIsolation -enable-upcoming-feature GlobalActorIsolatedTypesUsability
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_GlobalActorIsolatedTypesUsability
// REQUIRES: swift_feature_RegionBasedIsolation
func inferSendableFunctionType() {
let closure: @MainActor () -> Void = {}

View File

@@ -10,6 +10,7 @@
// rdar://76038845
// REQUIRES: concurrency_runtime
// REQUIRES: swift_feature_SymbolLinkageMarkers
// UNSUPPORTED: back_deployment_runtime
@MainActor

View File

@@ -1,5 +1,6 @@
// RUN: %target-typecheck-verify-swift -target %target-swift-5.1-abi-triple -enable-experimental-feature GroupActorErrors -strict-concurrency=complete
// REQUIRES: concurrency
// REQUIRES: swift_feature_GroupActorErrors
@MainActor
protocol P {

View File

@@ -4,7 +4,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -emit-sil -verify -o /dev/null %s -strict-concurrency=complete -enable-upcoming-feature RegionBasedIsolation
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// Check that the inserted hop-to-executor instructions don't cause a false
// "unreachable code" warning.

View File

@@ -6,7 +6,7 @@
// hoptomainactorifneeded_interpreter.
// REQUIRES: objc_interop
// REQUIRES: asserts
// REQUIRES: swift_feature_GenerateForceToMainActorThunks
// UNSUPPORTED: back_deployment_runtime
// UNSUPPORTED: back_deploy_concurrency

View File

@@ -12,10 +12,10 @@
// RUN: %target-codesign %t/main_crash
// RUN: %target-run %t/main_crash %t/%target-library-name(PreconcurrencyUnchecked)
// REQUIRES: asserts
// REQUIRES: executable_test
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: swift_feature_GenerateForceToMainActorThunks
// UNSUPPORTED: back_deployment_runtime
// UNSUPPORTED: back_deploy_concurrency

View File

@@ -1,6 +1,6 @@
// RUN: %target-swift-frontend -typecheck -verify -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature InferSendableFromCaptures %s
// REQUIRES: asserts
// REQUIRES: swift_feature_InferSendableFromCaptures
func globalNonisolatedFunction() {}
@MainActor func globalMainActorFunction() {}

View File

@@ -1,7 +1,7 @@
// RUN: %target-swift-emit-silgen -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature IsolatedDefaultValues -parse-as-library %s | %FileCheck %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_IsolatedDefaultValues
@MainActor
func requiresMainActor() -> Int { 0 }

View File

@@ -3,7 +3,9 @@
// RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-upcoming-feature InferSendableFromCaptures %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_InferSendableFromCaptures
// REQUIRES: swift_feature_IsolatedDefaultValues
// REQUIRES: swift_feature_RegionBasedIsolation
@globalActor
actor SomeGlobalActor {

View File

@@ -5,6 +5,9 @@
// RUN: %target-swift-frontend %s -emit-sil -o /dev/null -verify -disable-availability-checking -swift-version 5 -I %t -enable-upcoming-feature RegionBasedIsolation -enable-upcoming-feature IsolatedDefaultValues -enable-upcoming-feature StrictConcurrency
// REQUIRES: concurrency
// REQUIRES: swift_feature_IsolatedDefaultValues
// REQUIRES: swift_feature_RegionBasedIsolation
// REQUIRES: swift_feature_StrictConcurrency
import SerializedDefaultArguments

View File

@@ -6,7 +6,8 @@
// RUN: %target-swift-frontend -I %t -target %target-swift-5.1-abi-triple -strict-concurrency=complete -parse-as-library -emit-sil -o /dev/null -verify -enable-upcoming-feature IsolatedDefaultValues -enable-upcoming-feature RegionBasedIsolation %s
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_IsolatedDefaultValues
// REQUIRES: swift_feature_RegionBasedIsolation
// This tests errors emitted in definite initialization; this test file cannot
// have any type checker errors. Type checker errors for IsolatedDefaultValues

View File

@@ -1,7 +1,7 @@
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -swift-version 6 -parse-as-library %s -emit-sil -o /dev/null -verify -strict-concurrency=complete
// REQUIRES: concurrency
// REQUIRES: asserts
// REQUIRES: swift_feature_GlobalActorInferenceCutoff
@MainActor
protocol GloballyIsolated {}

View File

@@ -5,7 +5,8 @@
// REQUIRES: concurrency
// REQUIRES: objc_interop
// REQUIRES: asserts
// REQUIRES: swift_feature_RegionBasedIsolation
// REQUIRES: swift_feature_SendableCompletionHandlers
// overload resolution should pick sync version in a sync context
func syncContext() {

View File

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

Some files were not shown because too many files have changed in this diff Show More