-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
Is your feature request related to a problem? Please describe.
Let's imagine that we have a following match statement over some ADT:
enum Tree{
case Int
case String
}
//...
tree match {
case Tree.Int => println(1)
case Tree.String => println(2)
}
We then modify ADT by adding two more cases - Double
and Float
.
Now, the compiler warns/emits error (depending on the project settings) that the match might not be exhaustive.
Describe the solution you'd like
I would like to have a code action that can be invoked on the mentioned match statement, that, when accepted, would add missing cases with ???
as implementation.
tree match {
case Tree.Int => println(1)
case Tree.String => println(2)
case Tree.Double => ???
case Tree.Float => ???
}
Describe alternatives you've considered
Write each missing case taking advantage from completions.
Additional context
No response
Search terms
code-action match case
tgodzik
Metadata
Metadata
Assignees
Labels
No labels