File tree Expand file tree Collapse file tree 2 files changed +33
-2
lines changed
test/Concurrency/attr_execution Expand file tree Collapse file tree 2 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
58
58
// / describe what change you made. The content of this comment isn't important;
59
59
// / it just ensures a conflict if two people change the module format.
60
60
// / Don't worry about adhering to the 80-column limit for this line.
61
- const uint16_t SWIFTMODULE_VERSION_MINOR = 955 ; // Lifetime dependencies on enum element
61
+ const uint16_t SWIFTMODULE_VERSION_MINOR = 956 ; // nonisolated(nonsending) isolation was moved
62
62
63
63
// / A standard hash seed used for all string hashes in a serialized module.
64
64
// /
@@ -707,8 +707,9 @@ enum class FunctionTypeIsolation : uint8_t {
707
707
NonIsolated,
708
708
Parameter,
709
709
Erased,
710
- GlobalActorOffset, // Add this to the global actor type ID
711
710
NonIsolatedCaller,
711
+ // NOTE: All of the new kinds should be added above.
712
+ GlobalActorOffset, // Add this to the global actor type ID
712
713
};
713
714
using FunctionTypeIsolationField = TypeIDField;
714
715
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t/src)
2
+ // RUN: split-file %s %t/src
3
+
4
+ /// Build the library A
5
+ // RUN: %target-swift-frontend -emit-module %t/src/A.swift \
6
+ // RUN: -module-name A -swift-version 6 -enable-library-evolution \
7
+ // RUN: -emit-module-path %t/A.swiftmodule \
8
+ // RUN: -emit-module-interface-path %t/A.swiftinterface
9
+
10
+ // Build the client using module
11
+ // RUN: %target-swift-emit-sil -verify -module-name Client -I %t %t/src/Client.swift
12
+
13
+ // RUN: rm %t/A.swiftmodule
14
+
15
+ // Re-build the client using interface
16
+ // RUN: %target-swift-emit-sil -verify -module-name Client -I %t %t/src/Client.swift
17
+
18
+ //--- A.swift
19
+ @MainActor
20
+ public final class Test {
21
+ public func test( _: @escaping @Sendable @MainActor ( ) -> Void ) { }
22
+ }
23
+
24
+ //--- Client.swift
25
+ import A
26
+
27
+ @MainActor
28
+ func test( t: Test , fn: @escaping @Sendable @MainActor ( ) -> Void ) {
29
+ t. test ( fn) // Ok
30
+ }
You can’t perform that action at this time.
0 commit comments