mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ConstraintSystem] Enforce TVO_CanBindToPack, and diagnose pack references outside
of pack expansion expressions.
This commit is contained in:
@@ -6146,6 +6146,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