When I want to inspect the comparison operator “<” in IDEA I found the source code defined in the primitive.kt is
* Compares this value with the specified value for order.
* Returns zero if this value is equal to the specified other value, a negative number if it’s less than other,
* or a positive number if it’s greater than other.
public override operator fun compareTo(other: Int): Int
but actually the return type is Boolean
val n:Boolean = a < b
I am a bit confuse here, can someone give some explanation?