[NI] Coerce to Unit expression in last block with explicit Unit

#KT-32037 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-18 13:56:00 +03:00
parent 25342240b5
commit 7df13c986e
10 changed files with 72 additions and 19 deletions
@@ -0,0 +1,13 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun coerceToUnit(f: () -> Unit) {}
class Inv<T>
fun <K> builder(block: Inv<K>.() -> Unit): K = TODO()
fun test() {
coerceToUnit {
builder {}
}
}