Skip to content

Commit 92e0fd4

Browse files
committed
[ConstraintSystem] Extend the early type variable binding heuristic to
builtin types.
1 parent b6b9006 commit 92e0fd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,8 @@ bool BindingSet::favoredOverDisjunction(Constraint *disjunction) const {
10101010
}
10111011
}
10121012

1013-
return type->is<StructType>() || type->is<EnumType>();
1013+
return type->is<StructType>() || type->is<EnumType>() ||
1014+
type->is<BuiltinType>();
10141015
})) {
10151016
// Result type of subscript could be l-value so we can't bind it early.
10161017
if (!TypeVar->getImpl().isSubscriptResultType() &&

0 commit comments

Comments
 (0)