mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge pull request #1333 from Microsoft/getOccurancesAssert
Handle const modifier in getOccurrences
This commit is contained in:
@@ -3807,6 +3807,10 @@ module ts {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// unsupported modifier
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var keywords: Node[] = [];
|
||||
var modifierFlag: NodeFlags = getFlagFromModifier(modifier);
|
||||
|
||||
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