Skip to content

Assist similar to Split && condition to work with case when #61758

@FMorschel

Description

@FMorschel

Today we have the following assits in this code:

void foo(List<int>? o) {
  if (o is List && o!.isEmpty) {} // Split && condition
}

I'm proposing we allow the same behaviour to work with case ... when so we split the when expression to an inner if.

CC @bwilkerson

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-assistIssues with analysis server assiststype-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