We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2028931 commit 6caf827Copy full SHA for 6caf827
lib/Sema/CSSimplify.cpp
@@ -1547,6 +1547,10 @@ shouldOpenExistentialCallArgument(
1547
adjustments |= OpenedExistentialAdjustmentFlags::InOut;
1548
}
1549
1550
+ // The argument may be a "var" instead of a "let".
1551
+ if (auto lv = dyn_cast<LValueType>(argTy->getCanonicalType()))
1552
+ argTy = lv->getObjectType();
1553
+
1554
// The argument type needs to be an existential type or metatype thereof.
1555
if (!argTy->isAnyExistentialType())
1556
return None;
0 commit comments