Added tests for new error messages on calls to unions.

This commit is contained in:
Titian Cernicova-Dragomir
2019-06-22 03:11:14 +03:00
parent 768318b30c
commit bc07eec015
6 changed files with 112 additions and 1 deletions

View File

@@ -22090,7 +22090,7 @@ namespace ts {
);
}
function invocationError(node: Node, apparentType: Type, kind: SignatureKind, relatedInformation?: DiagnosticRelatedInformation) {
const diagnostic: Diagnostic = createDiagnosticForNodeFromMessageChain(node, invocationErrorDetails(apparentType, kind));
const diagnostic = createDiagnosticForNodeFromMessageChain(node, invocationErrorDetails(apparentType, kind));
diagnostics.add(diagnostic);
invocationErrorRecovery(apparentType, kind, relatedInformation ? addRelatedInfo(diagnostic, relatedInformation) : diagnostic);
}