File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3
3
4
4
/// Build the library A
5
5
// RUN: %target-swift-frontend -emit-module %t/src/A.swift \
6
- // RUN: -disable-availability-checking \
6
+ // RUN: -disable-availability-checking -verify \
7
7
// RUN: -module-name A -swift-version 6 \
8
8
// RUN: -emit-module-path %t/A.swiftmodule
9
9
10
10
// Build the client
11
11
// RUN: %target-swift-frontend -emit-module %t/src/Client.swift \
12
- // RUN: -disable-availability-checking \
12
+ // RUN: -disable-availability-checking -verify \
13
13
// RUN: -module-name Client -I %t -swift-version 6 \
14
14
// RUN: -emit-module-path %t/Client.swiftmodule
15
15
@@ -28,6 +28,7 @@ public struct ImplicitlySendable {
28
28
29
29
public struct S : P {
30
30
nonisolated public var x : Int = 0
31
+ public var y : Int = 1
31
32
32
33
nonisolated public init ( ) { }
33
34
}
@@ -39,6 +40,8 @@ actor A {
39
40
func test( ) {
40
41
var s = S ( )
41
42
s. x += 0 // okay
43
+ // expected-error@+1 {{main actor-isolated property 'y' can not be mutated on a nonisolated actor instance}}
44
+ s. y += 1
42
45
var sendable = ImplicitlySendable ( )
43
46
sendable. prop = false // okay
44
47
}
You can’t perform that action at this time.
0 commit comments