Merge pull request #1779 from Microsoft/scopeOfUnionProperties
handle union properties in when doing getOccurences\findAllReferences
This commit is contained in:
commit
17b19bf465
2 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
7
tests/cases/fourslash/scopeOfUnionProperties.ts
Normal file
7
tests/cases/fourslash/scopeOfUnionProperties.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
////function f(s: string | number) {
|
||||
//// s.constr/*1*/uctor
|
||||
////}
|
||||
goTo.marker("1")
|
||||
verify.occurrencesAtPositionCount(1);
|
Loading…
Reference in a new issue