Files
kotlin-fork/idea/testData/inspectionsLocal/redundantUnitExpression/notRedundant7.kt
T
2020-06-23 10:25:53 +00:00

18 lines
273 B
Kotlin
Vendored

// PROBLEM: none
// WITH_RUNTIME
fun <T> doIt(p: () -> T): T = p()
fun Any.doDo() = Unit
abstract class A {
abstract fun a()
}
class B : A() {
override fun a() = doIt {
1.let { it.let { it.let { it.let { null?.doDo() } } } }
Unit<caret>
}
}