handle union properties in when doing getOccurences\findAllReferences

This commit is contained in:
Vladimir Matveev 2015-01-22 17:16:18 -08:00
parent 2052ac3958
commit 0940d3bb3b
2 changed files with 9 additions and 1 deletions

View File

@ -3903,7 +3903,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);