https://kotlinlang.org logo
p

poohbar

09/30/2017, 2:13 PM
Could someone explain to me how does Kotlin resolve these expressions?
Copy code
infix fun Float.pow(exp: Float) = Math.pow(this.toDouble(), exp.toDouble()).toFloat()

fun main(args: Array<String>) {
    val x = 2f pow 2 + 1f
}
Why does it first execute
2+1f
?