Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different ...

Non-primitive numeric literal constants cannot be used in pattern matches because they can be mapped to multiple different types through the use of a NumericLiteral module. Consider using replacing with a variable, and use 'when  = ' at the end of the match clause.