Skip to content

Commit 30ad8d0

Browse files
committed
[Typechecker] Return 'None' if TargetImpl isn't Wrapper or WrapperStorage when computing wrapper mutability
1 parent a422a1e commit 30ad8d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckStorage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ static Expr *buildStorageReference(AccessorDecl *accessor,
757757
bool isMemberLValue = isLValue;
758758
auto propertyWrapperMutability =
759759
[&](Decl *decl) -> Optional<std::pair<bool, bool>> {
760-
if (accessor->isCoroutine())
760+
if (target != TargetImpl::Wrapper && target != TargetImpl::WrapperStorage)
761761
return None;
762762
auto var = dyn_cast<VarDecl>(decl);
763763
if (!var)

0 commit comments

Comments
 (0)