Check if we're a bound struct

This commit is contained in:
Alejandro Alonso
2025-05-08 14:30:01 -07:00
parent e68b398d41
commit d5970d93b8
2 changed files with 8 additions and 1 deletions

View File

@@ -2157,7 +2157,8 @@ namespace {
// If a contextual type exists for this expression, apply it directly.
if (contextualType &&
(contextualType->isArray() || contextualType->isInlineArray())) {
(contextualType->getArrayElementType() ||
contextualType->getInlineArrayElementType())) {
// Now that we know we're actually going to use the type, get the
// version for use in a constraint.
contextualType = CS.getContextualType(expr, /*forConstraint=*/true);