Skip to content

Commit 43df1d8

Browse files
committed
[Concurrency] Don't spuriously record protocols inherited by Actor.
1 parent e148032 commit 43df1d8

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

lib/Frontend/ModuleInterfaceSupport.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -467,15 +467,7 @@ class InheritedProtocolCollector {
467467
// not extensions of that 'actor class'.
468468
if (actorClass &&
469469
inherited->isSpecificProtocol(KnownProtocolKind::Actor))
470-
return TypeWalker::Action::Continue;
471-
472-
#if false
473-
// If the protocol is a marker protocol, print it separately.
474-
if (inherited->isMarkerProtocol()) {
475-
protocolsToPrint.push_back({inherited, protoAndAvailability.second});
476470
return TypeWalker::Action::SkipChildren;
477-
}
478-
#endif
479471

480472
if (inherited->isSPI() && !printOptions.PrintSPIs)
481473
return TypeWalker::Action::Continue;

test/ModuleInterface/actor_isolation.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-module-interface-path %t/Test.swiftinterface -module-name Test -enable-experimental-concurrency %s
33
// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix CHECK < %t/Test.swiftinterface
4+
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/Test.swiftinterface
5+
46
// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-module-interface-path %t/TestFromModule.swiftinterface -module-name Test -enable-experimental-concurrency
57
// RUN: %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK < %t/TestFromModule.swiftinterface
8+
// RUN: %target-swift-frontend -typecheck-module-from-interface -module-name Test %t/TestFromModule.swiftinterface
69

710
// REQUIRES: concurrency
811

test/ModuleInterface/features.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ public func runSomethingSomewhere(body: () async -> Void) { }
7777
// CHECK-NEXT: #endif
7878
public func stage(with actor: MyActor) { }
7979

80-
// CHECK: #if compiler(>=5.3) && $MarkerProtocol
81-
// CHECK-NEXT: extension FeatureTest.MyActor : Swift.ConcurrentValue {}
82-
// CHECK-NEXT: #endif
80+
// CHECK-NOT: extension FeatureTest.MyActor : Swift.ConcurrentValue
8381

8482
// CHECK: #if compiler(>=5.3) && $MarkerProtocol
8583
// CHECK-NEXT: extension FeatureTest.OldSchool : FeatureTest.MP {

0 commit comments

Comments
 (0)