Created
June 28, 2016 03:13
-
-
Save hisui/1bb2dc58bd58b0a69c971ad05d2d69a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val Int.incr: Int get() = this + 1 | |
val Int.decr: Int get() = this - 1 | |
fun main(b: Boolean) { | |
println(if (b) Int::incr else Int::decr) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code snippet causes the Kotlin compiler (version 1.0.2) to crash.