mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
Handel modifier const in getOccurrances
This commit is contained in:
@@ -3802,6 +3802,9 @@ module ts {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
else if (declaration.flags & NodeFlags.Const) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var keywords: Node[] = [];
|
||||
var modifierFlag: NodeFlags = getFlagFromModifier(modifier);
|
||||
@@ -3857,6 +3860,8 @@ module ts {
|
||||
return NodeFlags.Export;
|
||||
case SyntaxKind.DeclareKeyword:
|
||||
return NodeFlags.Ambient;
|
||||
case SyntaxKind.ConstKeyword:
|
||||
return NodeFlags.Const;
|
||||
default:
|
||||
Debug.fail();
|
||||
}
|
||||
|
||||
14
tests/cases/fourslash/getOccurrencesConst.ts
Normal file
14
tests/cases/fourslash/getOccurrencesConst.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
/////*1*/const enum E1 {
|
||||
//// v1,
|
||||
//// v2
|
||||
////}
|
||||
////
|
||||
/////*2*/const c = 0;
|
||||
|
||||
goTo.marker("1");
|
||||
verify.occurrencesAtPositionCount(0);
|
||||
|
||||
goTo.marker("2");
|
||||
verify.occurrencesAtPositionCount(0);
|
||||
Reference in New Issue
Block a user