mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #84180 from meg-gupta/borrowandmutatepr
Add preliminary support for borrow accessors
This commit is contained in:
@@ -1339,6 +1339,11 @@ public:
|
||||
return finish(false, nullptr);
|
||||
}
|
||||
}
|
||||
if (auto *accessor = DC->getInnermostPropertyAccessorContext()) {
|
||||
if (accessor->isMutateAccessor()) {
|
||||
return finish(true, expr);
|
||||
}
|
||||
}
|
||||
|
||||
diags.diagnose(expr->getStartLoc(), diag::extraneous_address_of);
|
||||
return finish(false, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user