You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Find-all-refs for a in a123.a matches the a in all of A1, A2, A3.
Actual behavior:
It only matches the a in A3. If one of the spread elements in the definition of a123 is removed, then it will correctly highlight both remaining spread elements.
getRootSymbols isn't called recursively, so retrieval of original symbols from a spread type needs to itself be recursive. It's a linear recursion so it would be better to implement it as a while/push loop in Javascript. The base case is a symbol that is (1) not transient (2) doesn't have a leftSpread property.
TypeScript Version: nightly (2.2.0-dev.20170124)
Code
(based on
tests/cases/fourslash/findAlRefsObjectSpread.ts
)Expected behavior:
Find-all-refs for
a
ina123.a
matches thea
in all ofA1
,A2
,A3
.Actual behavior:
It only matches the
a
inA3
. If one of the spread elements in the definition ofa123
is removed, then it will correctly highlight both remaining spread elements.CC @sandersn
The text was updated successfully, but these errors were encountered: