always visit them all (#24802) (#24807)

This commit is contained in:
Wesley Wigham
2018-06-08 18:57:34 -07:00
committed by GitHub
parent dc8242a467
commit 2e81256b20
6 changed files with 88 additions and 5 deletions
+5 -1
View File
@@ -18608,7 +18608,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 !== unknownType) {
@@ -20756,6 +20756,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