Assert:checkTypeArguments isn't passed too many type arguments

This commit is contained in:
Nathan Shively-Sanders
2017-10-12 10:38:02 -07:00
parent 8ea13bef48
commit 27b4417304

View File

@@ -15649,6 +15649,7 @@ namespace ts {
const typeArgumentTypes = fillMissingTypeArguments(map(typeArgumentNodes, getTypeFromTypeNode), typeParameters, getMinTypeArgumentCount(typeParameters), isJavascript);
let mapper: TypeMapper;
for (let i = 0; i < typeArgumentNodes.length; i++) {
Debug.assert(typeParameters[i] !== undefined, "Should not call checkTypeArguments with too many type arguments");
const constraint = getConstraintOfTypeParameter(typeParameters[i]);
if (!constraint) continue;