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) {
8785
8785
if (auto *vd = dyn_cast_or_null<ValueDecl>(dc->getAsDecl ()))
8786
8786
return getActorIsolation (vd);
8787
8787
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.
8795
8788
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 ()))
8803
8791
return getActorIsolation (var);
8804
- }
8805
8792
}
8806
8793
8807
8794
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