Merge pull request #64498 from hborla/diagnose-pack-outside-expansion-expr

[ConstraintSystem] Enforce `TVO_CanBindToPack`, and diagnose pack references outside of pack expansion expressions.
This commit is contained in:
Holly Borla
2023-03-21 14:00:52 -07:00
committed by GitHub
9 changed files with 124 additions and 9 deletions

View File

@@ -6170,6 +6170,12 @@ bool InvalidPackElement::diagnoseAsError() {
return true;
}
bool InvalidPackReference::diagnoseAsError() {
emitDiagnostic(diag::pack_reference_outside_expansion,
packType, /*inExpression*/true);
return true;
}
bool CollectionElementContextualFailure::diagnoseAsError() {
auto anchor = getRawAnchor();
auto *locator = getLocator();