Created
May 8, 2021 14:12
-
-
Save slavonnet/08854f1148df842fd30ae99e3c686982 to your computer and use it in GitHub Desktop.
?: funny
This file contains 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
data class BIf(val res: Boolean, val u: Any) | |
infix fun BIf.`ee` ( u: Any) = if (!this.res) u else this.u | |
infix fun Boolean.`ii` ( u: Any) = BIf( this@ii, u) | |
fun test (): Any { | |
return true ii "aaa" ee "vccc" | |
} | |
Author
slavonnet
commented
May 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment