File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2044,10 +2044,14 @@ bool TypeVarBindingProducer::computeNext() {
2044
2044
addNewBinding (binding.withSameSource (voidType, BindingKind::Exact));
2045
2045
}
2046
2046
2047
- for (auto supertype : enumerateDirectSupertypes (type)) {
2048
- // If we're not allowed to try this binding, skip it.
2049
- if (auto simplifiedSuper = checkTypeOfBinding (TypeVar, supertype))
2050
- addNewBinding (binding.withType (*simplifiedSuper));
2047
+ // If this is a type variable representing a key path type,
2048
+ // try to bind to any direct supertypes.
2049
+ if (!TypeVar->getImpl ().isKeyPathType ()) {
2050
+ for (auto supertype : enumerateDirectSupertypes (type)) {
2051
+ // If we're not allowed to try this binding, skip it.
2052
+ if (auto simplifiedSuper = checkTypeOfBinding (TypeVar, supertype))
2053
+ addNewBinding (binding.withType (*simplifiedSuper));
2054
+ }
2051
2055
}
2052
2056
}
2053
2057
}
You can’t perform that action at this time.
0 commit comments