Merge pull request #1779 from Microsoft/scopeOfUnionProperties

handle union properties in when doing getOccurences\findAllReferences
This commit is contained in:
Vladimir Matveev 2015-01-26 15:21:48 -08:00
commit 17b19bf465
2 changed files with 9 additions and 1 deletions

View file

@ -3943,7 +3943,8 @@ module ts {
}
// if this symbol is visible from its parent container, e.g. exported, then bail out
if (symbol.parent) {
// if symbol correspond to the union property - bail out
if (symbol.parent || (symbol.getFlags() & SymbolFlags.UnionProperty)) {
return undefined;
}

View file

@ -0,0 +1,7 @@
/// <reference path='fourslash.ts'/>
////function f(s: string | number) {
//// s.constr/*1*/uctor
////}
goTo.marker("1")
verify.occurrencesAtPositionCount(1);