Fixed crash that occurred when specializing a class with a TypeVarTuple and failing to provide a type argument for the TypeVarTuple type parameter.

This commit is contained in:
Eric Traut 2021-11-18 19:29:35 -08:00
parent 5a2c9435b5
commit cfc07ef20f

View File

@ -4930,7 +4930,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
// Do we need to adjust the type arguments to map to a variadic type
// param at the end of the list?
if (variadicIndex >= 0) {
if (variadicIndex >= 0 && variadicIndex < typeArgs.length) {
if (tupleClassType && isInstantiableClass(tupleClassType)) {
const variadicTypeResults = typeArgs.slice(
variadicIndex,