Apparently Range has a method that checks to see if it contains a value of type Any. I understand that this is from SeqLike , but it causes some problems.
For example, I answered for hours with joda.DateTime:
DateTime.now match { case d if 0 to 12 contains d.hourOfDay() => ...
Here d.hourOfDay () returns DateTime.Property, not Int, but the code is still compiling due to contains(elem: Any) . Is there a way to check for such calls at compile time?
source share