-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
After #54786 was closed, we now have a bug in the following code when using the assist:
file.dart:
class A {}main.dart
import 'file.dart' as f hide A;
void foo(l.A a) {} // <-- Use imported library with prefix...Currently adds a new prefix so at that line we end up with void foo(l.l.A a) {}.
Also, prefix-related, I think this could probably be fixed together. If the code was instead:
import 'file.dart' as f hide A; // Uneeded for the explanation but a reason for the prefix later in the file
import 'file.dart' hide A;
void foo(l.A a) {} // <-- Update library importIt removes the hide A but it doesn't look whether there is a prefix on the element. I'm unsure if this suggestion should be suppressed or if we should remove the prefix (preferred) in that case (there is no suggestion if the hide A or a show is not present at the import).
tenhobi
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)