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