Skip to content

After updating vscode started showing multiple definitions #51489

Closed

Description

@denismamorim

Hello

After updating from version 1.23.1 to 1.24.0 the shortcut "Go to definition" started finding two definitions where there is only one. A simple way yo reproduce is this:

const f  = x => console.log(x)
f()

When I Ctrl + Click or F12 the f function it finds two definitions:
image

Is there any way to revert to the previews behavior?

I am using vscode v1.24.0 in Ubuntu 16.04

Thanks in advance

Activity

  1. geirsagberg commented on Jun 9, 2018

    @geirsagberg
    Contributor

    I noticed this as well. This seems to me to be a bug; there is only one real definition here, as is evidenced by clicking results showing the same line.

  2. alexjeffburke commented on Jun 9, 2018

    @alexjeffburke

    Thanks for opening this issue, I thought I was going nuts - I think what I'm experiencing is related: it looks like vscode gets confused between the call-site of a function expression and the definition of it earlier in the file, so while it jumps up to the definition it also opens up the multiple definitions pane. The effect is that every other cmd-click needs to be followed by pressing escape. Just confirmed on second machine this came in on upgrade for 1.23.1 -> 1.24.0. Thanks.

  3. mjbvz commented on Jun 11, 2018

    @mjbvz
    Contributor

    Thanks. Opened microsoft/TypeScript#24861 to track this upstream

  4. added
    upstreamIssue identified as 'upstream' component related (exists outside of VS Code)
    javascriptJavaScript support issues
    bugIssue identified by VS Code Team member as probable bug
    and removed on Jun 11, 2018
  5. benevbright commented on Jul 7, 2018

    @benevbright

    any workaround?

  6. locked and limited conversation to collaborators on Jul 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugjavascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)verifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions