When exactly is the operator keyword required in Kotlin? : <p>In the <a href="https://try.kotlinlang.org/#/Kotlin%20Koans/Conventions/Comparison/Task.kt" rel="noreferrer">14th Kotlin Koan</a> on operator overloading, I was suprised when after solving I viewed the answer and saw that the <code>operator</code> modifier was <strong>not</strong> required on the <code>compareTo</code> method:</p>

<pre><code>data class MyDate(val year: Int, val month: Int, val dayOfMonth: Int) : Comparable&lt;MyDate&gt; {
    override fun compareTo(other: MyDate) = when {
        year != other.year -&gt; year - other.year
        month != other.month -&gt; month - other.month
        else -&gt; dayOfMonth - other.dayOfMonth
    }
}
</code></pre>

<p>The <a href="http://kotlinlang.org/docs/reference/operator-overloading.html" rel="noreferrer">operator overloading docs</a> linked to from the exercise explicitly says: </p>

<blockquote>
  <p>Functions that overload operators need to be marked with the operator
  modifier.</p>
</blockquote>

<p>So what's going on here?  Why does this code compile?  When exactly is <code>operator</code> required?</p>
