Merge pull request #84180 from meg-gupta/borrowandmutatepr

Add preliminary support for borrow accessors
This commit is contained in:
Meghana Gupta
2025-09-15 10:01:15 -07:00
committed by GitHub
97 changed files with 2410 additions and 193 deletions

View File

@@ -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);