mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user