Skip to content

Error in find-all-references for 3 spread types #13654

Open
@ghost

Description

TypeScript Version: nightly (2.2.0-dev.20170124)

Code

(based on tests/cases/fourslash/findAlRefsObjectSpread.ts)

interface A1 { a: string };
interface A2 { a?: number };
interface A3 { a?: RegExp };
declare let a1: A1;
declare let a2: A2;
declare let a3: A3;
let a12 = { ...a1, ...a2, ...a3 };
a12.a;

Expected behavior:

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.

CC @sandersn

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions