Skip to content

CTRL + Click on alias defined multiple times results in weird output #56931

@FMorschel

Description

@FMorschel

Repro:

  1. Empty file a.dart
  2. File b.dart with class Foo {} inside.
  3. Create a file main.dart with the following content:
import 'a.dart' as lib;
import 'b.dart' as lib;

void main() {
  lib.Foo();
}

Even though Foo comes from b.dart when you CTRL + Click lib. before it, it moves the cursor for line 1 (import 'a.dart' as lib;).

I'd expect it to show the second line (for b.dart) or if both imports have that element for it to show a peek window to see all imports and select which you want (or default to this if there is nothing after the prefix).

This is a bad behaviour specially when there are multiple imports between the two (or more) that have the alias and you can't see them.


CC: @DanTup

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestdevexp-uxlegacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions