title: Kotlin Char compareTo fails
body: <p>I have a following code snippet in Kotlin:</p>
  
  <pre><code>val pair: Pair&lt;Char,Char&gt; = 'z' to 'z'
  val comparison = pair.first.compareTo(pair.second)
  println(comparison)
  </code></pre>
  
  <p>It fails at the second line with the following exception when I try to run it:</p>
  
  <blockquote>
    <p>java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number</p>
  </blockquote>
  
  <p>IDE (IntelliJ) doesn't complain about any wrong type. The issue is somehow related to the fact that Chars are coming from <code>Pair&lt;Char, Char&gt;</code> because <code>'z'.compareTo('z')</code> works fine. Do you know how Kotlin resolves the following call?</p>
  
  <p>I'm using Kotlin 1.0.4</p>