Use checkExpression, not checkExpressionCached

This commit is contained in:
Nathan Shively-Sanders
2016-06-29 18:47:10 -07:00
parent c5e680c8be
commit 5f6e25c8d2

View File

@@ -12547,7 +12547,7 @@ namespace ts {
// In strict null checking mode, if a default value of a non-undefined type is specified, remove
// undefined from the final type.
if (strictNullChecks &&
!(getCombinedTypeFlags(checkExpressionCached(prop.objectAssignmentInitializer)) & TypeFlags.Undefined)) {
!(getCombinedTypeFlags(checkExpression(prop.objectAssignmentInitializer)) & TypeFlags.Undefined)) {
sourceType = getTypeWithFacts(sourceType, TypeFacts.NEUndefined);
}
checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, contextualMapper);