always visit them all (#24802)

This commit is contained in:
Wesley Wigham
2018-06-08 13:11:30 -07:00
committed by GitHub
parent f17fe8713e
commit 4240d9dc0f
6 changed files with 88 additions and 5 deletions

View File

@@ -18620,7 +18620,7 @@ namespace ts {
if (node.expression.kind === SyntaxKind.SuperKeyword) {
const superType = checkSuperExpression(node.expression);
if (isTypeAny(superType)) {
forEach(node.arguments, checkExpression); // Still visit arguments so they get marked for visibility, etc
forEach(node.arguments, checkExpresionNoReturn); // Still visit arguments so they get marked for visibility, etc
return anySignature;
}
if (superType !== errorType) {
@@ -20781,6 +20781,10 @@ namespace ts {
return type;
}
function checkExpresionNoReturn(node: Expression) {
checkExpression(node);
}
// Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When
// contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the
// expression is being inferentially typed (section 4.15.2 in spec) and provides the type mapper to use in