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 33
44/// Build the library A
55// RUN: %target-swift-frontend -emit-module %t/src/A.swift \
6- // RUN: -disable-availability-checking \
6+ // RUN: -disable-availability-checking -verify \
77// RUN: -module-name A -swift-version 6 \
88// RUN: -emit-module-path %t/A.swiftmodule
99
1010// Build the client
1111// RUN: %target-swift-frontend -emit-module %t/src/Client.swift \
12- // RUN: -disable-availability-checking \
12+ // RUN: -disable-availability-checking -verify \
1313// RUN: -module-name Client -I %t -swift-version 6 \
1414// RUN: -emit-module-path %t/Client.swiftmodule
1515
@@ -28,6 +28,7 @@ public struct ImplicitlySendable {
2828
2929public struct S : P {
3030 nonisolated public var x : Int = 0
31+ public var y : Int = 1
3132
3233 nonisolated public init ( ) { }
3334}
@@ -39,6 +40,8 @@ actor A {
3940 func test( ) {
4041 var s = S ( )
4142 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
4245 var sendable = ImplicitlySendable ( )
4346 sendable. prop = false // okay
4447 }
You can’t perform that action at this time.
0 commit comments