Skip to content

Commit 6ce2454

Browse files
committed
Make sure we open an lvalue of existential type during application.
1 parent d72b9a4 commit 6ce2454

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
@@ -5935,7 +5935,8 @@ ArgumentList *ExprRewriter::coerceCallArguments(
59355935

59365936
// If the argument is an existential type that has been opened, perform
59375937
// the open operation.
5938-
if (argType->getInOutObjectType()->isAnyExistentialType() &&
5938+
if (argType->getRValueType()->getInOutObjectType()
5939+
->isAnyExistentialType() &&
59395940
paramType->hasOpenedExistential()) {
59405941
// FIXME: Look for an opened existential and use it. We need to
59415942
// know how far out we need to go to close the existentials. Huh.

0 commit comments

Comments
 (0)