You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/Concurrency/predates_concurrency.swift
+40-2Lines changed: 40 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -103,8 +103,8 @@ func testCalls(x: X) {
103
103
let _:()->Void= onMainActorAlways // expected-complete-tns-warning {{converting function value of type '@MainActor () -> ()' to '() -> Void' loses global actor 'MainActor'}}
104
104
105
105
// both okay with minimal/targeted... an error with complete.
106
-
letc=MyModelClass() // expected-complete-tns-error {{call to main actor-isolated initializer 'init()' in a synchronous nonisolated context}}
107
-
c.f() // expected-complete-tns-error {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
106
+
letc=MyModelClass() // expected-complete-tns-warning {{call to main actor-isolated initializer 'init()' in a synchronous nonisolated context}}
107
+
c.f() // expected-complete-tns-warning {{call to main actor-isolated instance method 'f()' in a synchronous nonisolated context}}
108
108
}
109
109
110
110
func testCallsWithAsync()async{
@@ -207,3 +207,41 @@ class C { // expected-complete-tns-note {{'C' does not conform to the 'Sendable'
0 commit comments