[AST/ASTGen/Sema/Serialization] Remove @execution attribute

Complete the transition from `@execution` to `@concurrent` and `nonisolated(nonsending)`
This commit is contained in:
Pavel Yaskevich
2025-04-08 18:20:23 -07:00
parent 54b62ae983
commit 07ff063ae3
47 changed files with 242 additions and 686 deletions

View File

@@ -0,0 +1,42 @@
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name execution_attr -enable-experimental-feature ExecutionAttribute
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name execution_attr
// RUN: %FileCheck %s --input-file %t.swiftinterface
// REQUIRES: swift_feature_ExecutionAttribute
public struct Test {
// CHECK: nonisolated(nonsending) public init() async
nonisolated(nonsending)
public init() async {
}
// CHECK: @concurrent public func test() async
@concurrent
public func test() async {
}
// CHECK: public func other(_: nonisolated(nonsending) () async -> Swift.Void)
public func other(_: nonisolated(nonsending) () async -> Void) {}
// CHECK: nonisolated(nonsending) public var testOnVar: Swift.Int {
// CHECK-NEXT: get async
// CHECK-NEXT: }
nonisolated(nonsending)
public var testOnVar: Int {
get async {
42
}
}
// CHECK: nonisolated(nonsending) public subscript(onSubscript _: Swift.Int) -> Swift.Bool {
// CHECK-NEXT: get async
// CHECK-NEXT: }
nonisolated(nonsending)
public subscript(onSubscript _: Int) -> Bool {
get async {
false
}
}
}