Skip to content

Commit 904b455

Browse files
committed
Make sure we open an lvalue of existential type during application.
(cherry picked from commit 6ce2454)
1 parent aeb7456 commit 904b455

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/CSApply.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5929,7 +5929,8 @@ ArgumentList *ExprRewriter::coerceCallArguments(
59295929

59305930
// If the argument is an existential type that has been opened, perform
59315931
// the open operation.
5932-
if (argType->getInOutObjectType()->isAnyExistentialType() &&
5932+
if (argType->getRValueType()->getInOutObjectType()
5933+
->isAnyExistentialType() &&
59335934
paramType->hasOpenedExistential()) {
59345935
// FIXME: Look for an opened existential and use it. We need to
59355936
// know how far out we need to go to close the existentials. Huh.

0 commit comments

Comments
 (0)