Skip to content

Commit 4fedd08

Browse files
committed
fix test failure in global_actor_inference_swift6.swift
1 parent c4313ea commit 4fedd08

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/Sema/TypeCheckDeclPrimary.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2146,7 +2146,11 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
21462146
(void) VD->getPropertyWrapperAuxiliaryVariables();
21472147
(void) VD->getPropertyWrapperInitializerInfo();
21482148
(void) VD->getImplInfo();
2149-
(void)getActorIsolation(VD);
2149+
// Declarations inside types are handled in checkConformancesInContext() to
2150+
// avoid cycles involving associated type inference.
2151+
if (!VD->getDeclContext()->isTypeContext()) {
2152+
(void)getActorIsolation(VD);
2153+
}
21502154

21512155
// Visit auxiliary decls first
21522156
VD->visitAuxiliaryDecls([&](VarDecl *var) {

test/Concurrency/experimental_feature_strictconcurrency.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %target-typecheck-verify-swift -parse-as-library -enable-experimental-feature StrictConcurrency -enable-experimental-feature GlobalConcurrency
2-
// RUN: %target-typecheck-verify-swift -parse-as-library -enable-experimental-feature StrictConcurrency=complete -enable-experimental-feature GlobalConcurrency
1+
// RUN: %target-typecheck-verify-swift -disable-availability-checking -parse-as-library -enable-experimental-feature StrictConcurrency -enable-experimental-feature GlobalConcurrency
2+
// RUN: %target-typecheck-verify-swift -disable-availability-checking -parse-as-library -enable-experimental-feature StrictConcurrency=complete -enable-experimental-feature GlobalConcurrency
33
// REQUIRES: concurrency
44

55
class C1 { } // expected-note{{class 'C1' does not conform to the 'Sendable' protocol}}

0 commit comments

Comments
 (0)