File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -14860,6 +14860,14 @@ namespace ts {
14860
14860
target = removeTypesFromUnionOrIntersection(<UnionOrIntersectionType>target, matchingTypes);
14861
14861
}
14862
14862
}
14863
+ else if (target.flags & TypeFlags.Substitution) {
14864
+ target = (target as SubstitutionType).typeVariable;
14865
+ }
14866
+ else if (target.flags & TypeFlags.IndexedAccess && (
14867
+ (<IndexedAccessType>target).objectType.flags & TypeFlags.Substitution ||
14868
+ (<IndexedAccessType>target).indexType.flags & TypeFlags.Substitution)) {
14869
+ target = getIndexedAccessType(getActualTypeVariable((<IndexedAccessType>target).objectType), getActualTypeVariable((<IndexedAccessType>target).indexType));
14870
+ }
14863
14871
if (target.flags & TypeFlags.TypeVariable) {
14864
14872
// If target is a type parameter, make an inference, unless the source type contains
14865
14873
// the anyFunctionType (the wildcard type that's used to avoid contextually typing functions).
@@ -14921,9 +14929,6 @@ namespace ts {
14921
14929
}
14922
14930
}
14923
14931
}
14924
- else if (target.flags & TypeFlags.Substitution) {
14925
- inferFromTypes(source, (target as SubstitutionType).typeVariable);
14926
- }
14927
14932
if (getObjectFlags(source) & ObjectFlags.Reference && getObjectFlags(target) & ObjectFlags.Reference && (<TypeReference>source).target === (<TypeReference>target).target) {
14928
14933
// If source and target are references to the same generic type, infer from type arguments
14929
14934
const sourceTypes = (<TypeReference>source).typeArguments || emptyArray;
You can’t perform that action at this time.
0 commit comments