@@ -330,6 +330,9 @@ enum TypeVariableOptions {
330
330
// / Whether a more specific deduction for this type variable implies a
331
331
// / better solution to the constraint system.
332
332
TVO_PrefersSubtypeBinding = 0x10 ,
333
+
334
+ // / Whether the type variable can be bound to a pack type or not.
335
+ TVO_CanBindToPack = 0x20 ,
333
336
};
334
337
335
338
// / The implementation object for a type variable used within the
@@ -387,18 +390,21 @@ class TypeVariableType::Implementation {
387
390
&& " Truncation" );
388
391
}
389
392
390
- // / Whether this type variable can bind to an lvalue type .
393
+ // / Whether this type variable can bind to an LValueType .
391
394
bool canBindToLValue () const { return getRawOptions () & TVO_CanBindToLValue; }
392
395
393
- // / Whether this type variable can bind to an inout type .
396
+ // / Whether this type variable can bind to an InOutType .
394
397
bool canBindToInOut () const { return getRawOptions () & TVO_CanBindToInOut; }
395
398
396
- // / Whether this type variable can bind to an inout type .
399
+ // / Whether this type variable can bind to a noescape FunctionType .
397
400
bool canBindToNoEscape () const { return getRawOptions () & TVO_CanBindToNoEscape; }
398
401
399
- // / Whether this type variable can bind to a hole .
402
+ // / Whether this type variable can bind to a PlaceholderType .
400
403
bool canBindToHole () const { return getRawOptions () & TVO_CanBindToHole; }
401
404
405
+ // / Whether this type variable can bind to a PackType.
406
+ bool canBindToPack () const { return getRawOptions () & TVO_CanBindToPack; }
407
+
402
408
// / Whether this type variable prefers a subtype binding over a supertype
403
409
// / binding.
404
410
bool prefersSubtypeBinding () const {
@@ -638,6 +644,7 @@ class TypeVariableType::Implementation {
638
644
ENTRY (TVO_CanBindToNoEscape, " noescape" );
639
645
ENTRY (TVO_CanBindToHole, " hole" );
640
646
ENTRY (TVO_PrefersSubtypeBinding, " " );
647
+ ENTRY (TVO_CanBindToPack, " pack" );
641
648
}
642
649
#undef ENTRY
643
650
}
0 commit comments