mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
handle union properties in when doing getOccurences\findAllReferences
This commit is contained in:
parent
2052ac3958
commit
0940d3bb3b
@ -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;
|
||||
}
|
||||
|
||||
|
||||
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…
x
Reference in New Issue
Block a user