Files
kotlin-fork/js/js.translator/testFiles/extensionFunction/cases/extensionWithImplicitReceiver.kt
T
2012-02-27 21:55:58 +04:00

13 lines
164 B
Kotlin

package foo
fun Int.same() : Int {
return this
}
fun Int.quadruple() : Int {
return same() * 4;
}
fun box(): Boolean {
return (3.quadruple() == 12)
}