Skip to content

Commit 76564ea

Browse files
[CSBindings] Avoid to infer transitive defaults for DefaultClosureType
1 parent b49be98 commit 76564ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,12 @@ void PotentialBindings::inferTransitiveBindings(
369369
addLiteral(literal.second.getSource());
370370

371371
// Infer transitive defaults.
372-
for (const auto &def : bindings.Defaults)
372+
for (const auto &def : bindings.Defaults) {
373+
if (def.getSecond()->getKind() == ConstraintKind::DefaultClosureType)
374+
continue;
375+
373376
addDefault(def.second);
377+
}
374378

375379
// TODO: We shouldn't need this in the future.
376380
if (entry.second->getKind() != ConstraintKind::Subtype)

0 commit comments

Comments
 (0)