Removed unnecessary code in the code path that handles type compatibility checks between two functions.

This commit is contained in:
Eric Traut 2022-12-21 20:05:40 -07:00
parent 00dcb33c99
commit 8fff7a816f

View File

@ -23627,24 +23627,6 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
);
});
// Perform partial specialization of type variables to allow for
// "higher-order" type variables.
if (!destTypeVarContext.isLocked()) {
destTypeVarContext.getTypeVars().forEach((entry) => {
if (entry.narrowBound) {
const specializedType = applySolvedTypeVars(entry.narrowBound, destTypeVarContext);
if (specializedType !== entry.narrowBound) {
destTypeVarContext.setTypeVarType(
entry.typeVar,
specializedType,
entry.wideBound,
entry.retainLiteral
);
}
}
});
}
// Are we assigning to a function with a ParamSpec?
if (targetIncludesParamSpec) {
const effectiveDestType = (flags & AssignTypeFlags.ReverseTypeVarMatching) === 0 ? destType : srcType;