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 @@ -8785,23 +8785,10 @@ ActorIsolation swift::getActorIsolationOfContext(DeclContext *dc) {
87858785 if (auto *vd = dyn_cast_or_null<ValueDecl>(dc->getAsDecl ()))
87868786 return getActorIsolation (vd);
87878787
8788- // In the context of the initializing or default-value expression of a
8789- // stored property, the isolation varies between global and type members:
8790- // - For a static stored property, the isolation matches the VarDecl.
8791- // - For a field of a nominal type, the expression is not isolated.
8792- // Without this distinction, a nominal can have non-async initializers
8793- // with various kinds of isolation, so an impossible constraint can be
8794- // created. See SE-0327 for details.
87958788 if (auto *init = dyn_cast<PatternBindingInitializer>(dc)) {
8796- if (auto *var =
8797- init->getBinding ()->getAnchoringVarDecl (init->getBindingIndex ())) {
8798-
8799- if (var->isInstanceMember () &&
8800- !var->getAttrs ().hasAttribute <LazyAttr>())
8801- return ActorIsolation::forUnspecified ();
8802-
8789+ if (auto *var = init->getBinding ()->getAnchoringVarDecl (
8790+ init->getBindingIndex ()))
88038791 return getActorIsolation (var);
8804- }
88058792 }
88068793
88078794 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