Skip to content

Pattern match on variable/argument code action doesn't work on lists #4806

@giacomocavalieri

Description

@giacomocavalieri

If I have this piece of code:

pub fn wibble(list: List(a)) {
  //          ^^^^
  todo
}

I'd like to trigger the pattern match on argument code action on list and get something like this:

pub fn wibble(list: List(a)) {
  case list {
    [first, ..rest] -> todo
    [] -> todo
  }
  todo
}

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions