Skip to content

Commit 2a18edc

Browse files
committed
[NFC][Concurrency] Update validation tests for @MainActor(unsafe) changes.
1 parent 47afd21 commit 2a18edc

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/attr/attr_objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1878,7 +1878,7 @@ class HasIBOutlet {
18781878
// CHECK-LABEL: {{^}}class HasIBAction {
18791879
class HasIBAction {
18801880
@IBAction func goodAction(_ sender: AnyObject?) { }
1881-
// CHECK: {{^}} @objc @IBAction @MainActor func goodAction(_ sender: AnyObject?) {
1881+
// CHECK: {{^}} @objc @IBAction @MainActor @preconcurrency func goodAction(_ sender: AnyObject?) {
18821882

18831883
@IBAction func badAction(_ sender: PlainStruct?) { }
18841884
// expected-error@-1{{method cannot be marked @IBAction because the type of the parameter cannot be represented in Objective-C}}

validation-test/ParseableInterface/unsafe-mainactor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
import AppKit
99

10-
// CHECK: @objc @_inheritsConvenienceInitializers @_Concurrency.MainActor(unsafe) public class Subclass : AppKit.NSView {
10+
// CHECK: @objc @_inheritsConvenienceInitializers @_Concurrency.MainActor @preconcurrency public class Subclass : AppKit.NSView {
1111
public class Subclass: NSView {
12-
// CHECK: @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame frameRect: Foundation.NSRect)
13-
// CHECK: @_Concurrency.MainActor(unsafe) @objc required dynamic public init?(coder: Foundation.NSCoder)
12+
// CHECK: @_Concurrency.MainActor @preconcurrency @objc override dynamic public init(frame frameRect: Foundation.NSRect)
13+
// CHECK: @_Concurrency.MainActor @preconcurrency @objc required dynamic public init?(coder: Foundation.NSCoder)
1414
}

validation-test/Sema/SwiftUI/rdar76252310.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ func fromConcurrencyAware() async {
4242
// expected-warning@+4 {{non-sendable type 'CoffeeTrackerView' passed in implicitly asynchronous call to main actor-isolated property 'body' cannot cross actor boundary}}
4343
// expected-note@+3 {{property access is 'async'}}
4444
// expected-warning@+2 {{non-sendable type 'some View' in implicitly asynchronous access to main actor-isolated property 'body' cannot cross actor boundary}}
45-
// expected-error@+1 {{expression is 'async' but is not marked with 'await'}}
45+
// expected-warning@+1 {{expression is 'async' but is not marked with 'await'}}
4646
_ = view.body
4747

4848
// expected-warning@+4 {{non-sendable type 'CoffeeTrackerView' passed in implicitly asynchronous call to main actor-isolated property 'showDrinkList' cannot cross actor boundary}}
4949
// expected-note@+3 {{property access is 'async'}}
5050
// expected-warning@+2 {{non-sendable type 'Visibility' in implicitly asynchronous access to main actor-isolated property 'showDrinkList' cannot cross actor boundary}}
51-
// expected-error@+1 {{expression is 'async' but is not marked with 'await'}}
51+
// expected-warning@+1 {{expression is 'async' but is not marked with 'await'}}
5252
_ = view.showDrinkList
5353

5454
// expected-warning@+2 {{non-sendable type 'CoffeeTrackerView' passed in implicitly asynchronous call to main actor-isolated property 'storage' cannot cross actor boundary}}

0 commit comments

Comments
 (0)