Replaces the `Nil` in pattern matching
Closed this issue ยท 2 comments
guizmaii commented
I was having something like this in my code:
args match {
case a :: b :: Nil => ..
...
}
And the plugin replaced the Nil
by List.empty
:
args match {
case a :: b :: List.Empty => ..
...
}
which obviously doesn't compile ๐
ghostbuster91 commented
Hi,
You probably tried 0.0.4
version which was indeed broken in that way. There was another version 0.0.6
but I forgot to update the releases. Didn't setup release drafter yet.
0.0.6
on the other hand rewrites all the list construction to List.empty
(including non-empty lists ๐ ).
I just pushed 0.0.7
which seems to be fixing that problem :) Should be available in maven central in few hours.
guizmaii commented
Hi :)
including non-empty lists
Ahah, that's an interesting behaviour ๐
I just pushed 0.0.7
Amazing! Will give it a try tomorrow! :)