title: Scala Range contains(elem: Any) method
body: <p>Apparently <code>Range</code> has a method that checks if it contains a value of type Any. I understand that it is from <code>SeqLike</code>, but causes some problems.</p>
  
  <p>For instance, i was matching hours from joda.DateTime:</p>
  
  <pre><code>DateTime.now match {
      case d if 0 to 12 contains d.hourOfDay() =&gt; ...
  </code></pre>
  
  <p>Here d.hourOfDay() returns DateTime.Property, not Int, but code still compiles, because of <code>contains(elem: Any)</code>. Is there any way to check for such calls at compile time?</p>