lunatech-scala2-to-scala3-course icon indicating copy to clipboard operation
lunatech-scala2-to-scala3-course copied to clipboard

Remove pattern guard from pattern matching expressions

Open eloots opened this issue 5 years ago • 0 comments

Adding pattern guards on case clauses leads to the inability of the compiler to check if a pattern match is complete. Let's remove this to illustrate how this should be done. Move the tests inside the expression executed.

eloots avatar Jun 03 '20 12:06 eloots