File tree Expand file tree Collapse file tree 2 files changed +2
-33
lines changed Expand file tree Collapse file tree 2 files changed +2
-33
lines changed Original file line number Diff line number Diff line change @@ -8667,23 +8667,10 @@ ActorIsolation swift::getActorIsolationOfContext(DeclContext *dc) {
8667
8667
if (auto *vd = dyn_cast_or_null<ValueDecl>(dc->getAsDecl ()))
8668
8668
return getActorIsolation (vd);
8669
8669
8670
- // In the context of the initializing or default-value expression of a
8671
- // stored property, the isolation varies between global and type members:
8672
- // - For a static stored property, the isolation matches the VarDecl.
8673
- // - For a field of a nominal type, the expression is not isolated.
8674
- // Without this distinction, a nominal can have non-async initializers
8675
- // with various kinds of isolation, so an impossible constraint can be
8676
- // created. See SE-0327 for details.
8677
8670
if (auto *init = dyn_cast<PatternBindingInitializer>(dc)) {
8678
- if (auto *var =
8679
- init->getBinding ()->getAnchoringVarDecl (init->getBindingIndex ())) {
8680
-
8681
- if (var->isInstanceMember () &&
8682
- !var->getAttrs ().hasAttribute <LazyAttr>())
8683
- return ActorIsolation::forUnspecified ();
8684
-
8671
+ if (auto *var = init->getBinding ()->getAnchoringVarDecl (
8672
+ init->getBindingIndex ()))
8685
8673
return getActorIsolation (var);
8686
- }
8687
8674
}
8688
8675
8689
8676
if (auto *closure = dyn_cast<AbstractClosureExpr>(dc)) {
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments