- Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixestype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
I was thinking a bit more about this fix, and I have three things to talk about:
- It should probably get renamed to
Create enum constantso it is more aligned with all otherCreate (extension) <member>fixes. - Missing case:
enum E { a(1); const E(int i); } void f(E e) { f(E.b); // Only displays `Change to 'a'` }(Congrats @kallentu for fixing this for dot sorthands!)
- When we have a constructor that takes parameters, we should create the constant and move the selection there with a
nullas a parameter, so the user knows they must fix it, like:
enum E { a(1); const E(int i); } void f(E e) { f(.b); // would add above `b(null)` }Like we would for other fixes, like getter and such, where we fill:
E get b => null;WDYT @bwilkerson?
Metadata
Metadata
Assignees
Labels
P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixestype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug