Skip to content

Commit 8a39f3f

Browse files
committed
[CSBindings] Mark type variables that represent packs as involving type variables
Such type variables always depend on pack expansion variables.
1 parent 2ebade1 commit 8a39f3f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ 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().canBindToPack())
154+
return true;
155+
151156
// This is effectively O(1) right now since bindings are re-computed
152157
// on each step of the solver, but once bindings are computed
153158
// incrementally it becomes more important to double-check that

0 commit comments

Comments
 (0)