fix crash in signature help

This commit is contained in:
Vladimir Matveev 2014-12-02 15:04:44 -08:00
parent ec0f5e44b8
commit 76e8560b0e
3 changed files with 7 additions and 5 deletions

View File

@ -257,7 +257,7 @@ module ts {
LastTypeNode = ParenthesizedType,
FirstPunctuation = OpenBraceToken,
LastPunctuation = CaretEqualsToken,
FirstToken = EndOfFileToken,
FirstToken = Unknown,
LastToken = TypeKeyword,
FirstTriviaToken = SingleLineCommentTrivia,
LastTriviaToken = WhitespaceTrivia,

View File

@ -280,10 +280,6 @@ module ts {
}
function nodeHasTokens(n: Node): boolean {
if (n.kind === SyntaxKind.Unknown) {
return false;
}
// If we have a token or node that has a non-zero width, it must have tokens.
// Note, that getWidth() does not take trivia into account.
return n.getWidth() !== 0;

View File

@ -0,0 +1,6 @@
/// <reference path='fourslash.ts'/>
////eval(\/*1*/
goTo.marker("1");
verify.signatureHelpCountIs(1);