Merge pull request #64119 from hborla/pack-expansion-shape-crash

[Diagnostics] Diagnose pack element expressions containing a non-pack a subexpression.
This commit is contained in:
Holly Borla
2023-03-05 10:11:02 -08:00
committed by GitHub
10 changed files with 93 additions and 11 deletions

View File

@@ -661,6 +661,9 @@ ConstraintSystem::getPackElementEnvironment(ConstraintLocator *locator,
if (result == PackExpansionEnvironments.end())
return nullptr;
if (!shapeClass->is<PackArchetypeType>())
return nullptr;
auto uuid = result->second;
auto &ctx = getASTContext();
auto elementSig = ctx.getOpenedElementSignature(