File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,12 @@ class AttributeChecker : public AttributeVisitor<AttributeChecker> {
133133 }
134134
135135 if (!getActorIsolation (nominal).isMainActor () && destructor->hasBody ()) {
136+ // In module emission jobs, type checking the body of the destructor may
137+ // be skipped which means availability in the body cannot be diagnosed
138+ // accurately.
139+ if (destructor->isBodySkipped ())
140+ return ;
141+
136142 TypeChecker::checkAvailability (
137143 destructor->getBodySourceRange (), C.getIsolatedDeinitAvailability (),
138144 D->getDeclContext (),
Original file line number Diff line number Diff line change 22// RUN: %target-typecheck-verify-swift -swift-version 5 %s -strict-concurrency=complete -target %target-swift-6.1-abi-triple
33// RUN: %target-typecheck-verify-swift -swift-version 5 %s -strict-concurrency=complete -target %target-swift-6.1-abi-triple -target-min-inlining-version min -verify-additional-prefix inlining-
44
5+ // Test -emit-module configurations.
6+
7+ // RUN: %target-swift-frontend -emit-module -verify -swift-version 5 %s -strict-concurrency=complete -target %target-swift-5.1-abi-triple -experimental-skip-non-inlinable-function-bodies -verify-additional-prefix inlining-
8+ // RUN: %target-swift-frontend -emit-module -verify -swift-version 5 %s -strict-concurrency=complete -target %target-swift-6.1-abi-triple -experimental-skip-non-inlinable-function-bodies -target-min-inlining-version min -verify-additional-prefix inlining-
9+
510// REQUIRES: concurrency
611// REQUIRES: OS=macosx
712
You can’t perform that action at this time.
0 commit comments