File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -2924,6 +2924,18 @@ void PrintAST::printInherited(const Decl *decl) {
2924
2924
Printer << " @unsafe " ;
2925
2925
break ;
2926
2926
}
2927
+
2928
+ if (auto globalActor = inherited.getGlobalActorIsolationType ()) {
2929
+ TypeLoc globalActorTL (globalActor->getTypeRepr (),
2930
+ globalActor->getInstanceType ());
2931
+ Printer << " @" ;
2932
+ printTypeLoc (globalActorTL);
2933
+ Printer << " " ;
2934
+ }
2935
+
2936
+ if (inherited.isNonisolated ())
2937
+ Printer << " nonisolated " ;
2938
+
2927
2939
if (inherited.isSuppressed ())
2928
2940
Printer << " ~" ;
2929
2941
});
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -typecheck -swift-version 6 -enable-library-evolution -module-name isolated_conformance -enable-experimental-feature IsolatedConformances -emit-module-interface-path - %s | %FileCheck %s
2
+
3
+ // REQUIRES: swift_feature_IsolatedConformances
4
+ // REQUIRES: concurrency
5
+
6
+ public protocol MyProtocol {
7
+ func f( )
8
+ }
9
+
10
+ @MainActor
11
+ public class MyClass { }
12
+
13
+ // CHECK: extension isolated_conformance.MyClass : @MainActor isolated_conformance.MyProtocol {
14
+ extension MyClass : @MainActor MyProtocol {
15
+ @MainActor public func f( ) { }
16
+ }
You can’t perform that action at this time.
0 commit comments