Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
stereotype441 opened this issue Jan 31, 2024 · 2 comments
Labels
devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@stereotype441
Copy link
Member

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.

@stereotype441 stereotype441 added legacy-area-analyzer Use area-devexp instead. devexp-quick-fix Issues with analysis server (quick) fixes labels Jan 31, 2024
@scheglov scheglov added the P3 A lower priority bug or feature request label Jan 31, 2024
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 15, 2024
@FMorschel
Copy link
Contributor

FMorschel commented Aug 30, 2024

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

@FMorschel
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-quick-fix Issues with analysis server (quick) fixes legacy-area-analyzer Use area-devexp instead. P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants