Skip to content

Commit 19a2eeb

Browse files
committed
Sema: Simplify BindingSet::isDirectHole()
1 parent 45d03e1 commit 19a2eeb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ bool BindingSet::isDirectHole() const {
103103
if (!CS.shouldAttemptFixes())
104104
return false;
105105

106-
return Bindings.empty() && getNumViableLiteralBindings() == 0 &&
107-
Defaults.empty() && TypeVar->getImpl().canBindToHole();
106+
return !hasViableBindings() && TypeVar->getImpl().canBindToHole();
108107
}
109108

110109
static bool isGenericParameter(TypeVariableType *TypeVar) {

0 commit comments

Comments
 (0)