Skip to content

Commit 1ca3b93

Browse files
authored
Merge pull request #40217 from hborla/early-bind-builtin-types
[ConstraintSystem] Extend the early type variable binding heuristic to builtin types.
2 parents 9099fe9 + 92e0fd4 commit 1ca3b93

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)