Files
kotlin-fork/compiler/visualizer/testData/uncommonCases/testFiles/receiver.kt
T
Ivan Cilcic 262f57d938 Add more tests in uncommonCases folder
1) dataClass.kt - test with data class
2) receiver.kt - test with Int extension receiver
3) delegation.kt - test with implementation by delegation
2019-08-30 11:50:35 +03:00

12 lines
153 B
Kotlin
Vendored

fun Int.addOne(): Int {
return this + 1
}
val Int.repeat: Int
get() = this
fun main() {
val i = 2
i.addOne()
val p = i.repeat * 2
}