Skip to content

Quick fix "Use imported library ... with prefix ..." should update show combinator #54786

Closed

Description

@stereotype441

Reproduced at 3636c8a using VSCode.

Start with the following code:

import 'dart:math' as math show log; // (1)

main() {
  print(sqrt2); // (2)
}

This code has a compile-time error at (2) (undefined_identifier).

Trigger quick fixes at that point, and select the fix "Use imported library 'dart:math' with prefix 'math'".

This causes line (2) to change to:

  print(math.sqrt2); // (2)

Which, unfortunately, still has a compile-time error, since the import at (1) doesn't show sqrt2.

It would be nice if the quick fix also updated the import's show combinator.

Activity

  1. added
    P3A lower priority bug or feature request
    on Jan 31, 2024
  2. FMorschel commented on Aug 30, 2024

    @FMorschel
    Contributor

    Related to Dart-Code/Dart-Code#5238.
    Somewhat to #36737.

  3. FMorschel commented on Oct 29, 2024

    @FMorschel
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestdevexp-quick-fixIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions