从无法访问的项目Fork
体验新版 GitCode,发现更多精彩内容 >>
fun <T, R> T.also(block: () -> R): R {
return null!!
}
fun foo(b: Boolean, a: Int) {
val x = when (b) { true -> a else -> null }?.also { 1 }