Added an error message for Concatenate if a TypeVarTuple is used in the concatenated list of types. This addresses https://github.com/microsoft/pylance-release/issues/4046.

This commit is contained in:
Eric Traut 2023-03-06 13:03:22 -07:00
parent f8edba07e5
commit 09161fdca4

View File

@ -15008,6 +15008,8 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
} else {
if (isParamSpec(typeArg.type)) {
addError(Localizer.Diagnostic.paramSpecContext(), typeArg.node);
} else if (isUnpackedVariadicTypeVar(typeArg.type)) {
addError(Localizer.Diagnostic.typeVarTupleContext(), typeArg.node);
}
}
});