Skip to content

Commit c0e652b

Browse files
authored
Merge pull request #60530 from apple/egorzhdan/base-subscript-lvalue
[cxx-interop] Emit LValue type in a base subscript assignment expression
2 parents 8cd8854 + 109d44c commit c0e652b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4692,7 +4692,7 @@ synthesizeBaseClassFieldSetterBody(AbstractFunctionDecl *afd, void *context) {
46924692

46934693
auto *argList = ArgumentList::forImplicitUnlabeled(ctx, {paramRefExpr});
46944694
storedRef = SubscriptExpr::create(ctx, pointeePropertyRefExpr, argList, subscript);
4695-
storedRef->setType(subscript->getElementInterfaceType());
4695+
storedRef->setType(LValueType::get(subscript->getElementInterfaceType()));
46964696
} else {
46974697
// If the base class var has a clang decl, that means it's an access into a
46984698
// stored field. Otherwise, we're looking into another base class, so it's a

0 commit comments

Comments
 (0)