Skip to content

Commit 1728cca

Browse files
committed
[CSBindings] Mark type variables that represent type parameter packs as "involving type variables"
Such type variables are always dependent on pack expansion type variables which should be bound first.
1 parent ce826c2 commit 1728cca

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ bool BindingSet::isDelayed() const {
148148
}
149149

150150
bool BindingSet::involvesTypeVariables() const {
151+
// This type variable always depends on a pack expansion variable
152+
// which should be inferred first if possible.
153+
if (TypeVar->getImpl().getGenericParameter() &&
154+
TypeVar->getImpl().canBindToPack())
155+
return true;
156+
151157
// This is effectively O(1) right now since bindings are re-computed
152158
// on each step of the solver, but once bindings are computed
153159
// incrementally it becomes more important to double-check that

0 commit comments

Comments
 (0)