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/actor_isolation_unsafe.swift
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ struct S3_P1: P1 {
30
30
}
31
31
32
32
structS4_P1:P1{
33
-
@SomeGlobalActorfunc onMainActor(){} // expected-error{{instance method 'onMainActor()' isolated to global actor 'SomeGlobalActor' can not satisfy corresponding requirement from protocol 'P1' isolated to global actor 'MainActor'}}
33
+
@SomeGlobalActorfunc onMainActor(){} // expected-warning{{instance method 'onMainActor()' isolated to global actor 'SomeGlobalActor' can not satisfy corresponding requirement from protocol 'P1' isolated to global actor 'MainActor'}}
// expected-error@-1{{instance method 'method1()' must be isolated to the global actor 'SomeGlobalActor' to satisfy corresponding requirement from protocol 'P2'}}
156
-
// expected-error@-2{{instance method 'method1()' must be isolated to the global actor 'OtherGlobalActor' to satisfy corresponding requirement from protocol 'P3'}}
Copy file name to clipboardExpand all lines: test/decl/class/actor/global_actor_conformance.swift
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ class C1 : P1, P2 {
33
33
34
34
func method1(){}
35
35
36
-
@GenericGlobalActor<String>func method2(){} // expected-error{{instance method 'method2()' isolated to global actor 'GenericGlobalActor<String>' can not satisfy corresponding requirement from protocol 'P1' isolated to global actor 'GenericGlobalActor<Int>'}}
36
+
@GenericGlobalActor<String>func method2(){} // expected-warning{{instance method 'method2()' isolated to global actor 'GenericGlobalActor<String>' can not satisfy corresponding requirement from protocol 'P1' isolated to global actor 'GenericGlobalActor<Int>'}}
37
37
@GenericGlobalActor<String>func method3(){}
38
-
@GlobalActorfunc method4(){} // expected-error{{instance method 'method4()' isolated to global actor 'GlobalActor' can not satisfy corresponding requirement from protocol 'P1'}}
38
+
@GlobalActorfunc method4(){} // expected-warning{{instance method 'method4()' isolated to global actor 'GlobalActor' can not satisfy corresponding requirement from protocol 'P1'}}
39
39
40
40
// Okay: we can ignore the mismatch in global actor types for 'async' methods.
0 commit comments