mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 02:15:12 -06:00
fix crash in signature help
This commit is contained in:
parent
ec0f5e44b8
commit
76e8560b0e
@ -257,7 +257,7 @@ module ts {
|
||||
LastTypeNode = ParenthesizedType,
|
||||
FirstPunctuation = OpenBraceToken,
|
||||
LastPunctuation = CaretEqualsToken,
|
||||
FirstToken = EndOfFileToken,
|
||||
FirstToken = Unknown,
|
||||
LastToken = TypeKeyword,
|
||||
FirstTriviaToken = SingleLineCommentTrivia,
|
||||
LastTriviaToken = WhitespaceTrivia,
|
||||
|
||||
@ -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;
|
||||
|
||||
6
tests/cases/fourslash/signatureHelpWithUnknown.ts
Normal file
6
tests/cases/fourslash/signatureHelpWithUnknown.ts
Normal file
@ -0,0 +1,6 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////eval(\/*1*/
|
||||
|
||||
goTo.marker("1");
|
||||
verify.signatureHelpCountIs(1);
|
||||
Loading…
x
Reference in New Issue
Block a user