Handel modifier const in getOccurrances

This commit is contained in:
Mohamed Hegazy
2014-12-01 23:46:09 -08:00
parent af324d1226
commit a9714257cc
2 changed files with 19 additions and 0 deletions

View File

@@ -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();
}

View 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);