title: Kotlin: Compiler doesn't infer generic type for some operators
body: <p>Why can't Kotlin's compiler infer the generic type with some operator calls? For example:</p>
  
  <pre><code>class Example {
  
      operator inline fun &lt;reified T : Any&gt; unaryMinus(): T {
          ...
      }
  
  }
  </code></pre>
  
  <p>Using it in a main method...</p>
  
  <pre><code>fun main(args: Array&lt;String&gt;) {
      val ex = Example()
  
      val works: Boolean = ex.unaryMinus()
      val doesntWork: Boolean = -ex
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/VrOK6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VrOK6.png" alt="enter image description here"></a></p>