Better type inference for Scala: send us your problematic cases!

@gabro That one is tricky since it would mean inferring a less precise type in a somewhat arbitrary way. Instead you can make Color extends Product with Serializable which I concede isn’t very nice either. Alternatively if you use Dotty enums, then the type of the value Color.Blue would just be Color, which sidesteps the problem.

5 Likes