[NI] Fix coercion to Unit for explicitly specified type argument

#KT-25424 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-11-21 18:22:28 +03:00
parent c6712ff861
commit 7a9fb3ca26
6 changed files with 28 additions and 4 deletions
@@ -0,0 +1,10 @@
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE
fun foo() {
val f = myRun<Unit> {
123
}
}
fun <R> myRun(block: () -> R): R = block()
@@ -0,0 +1,4 @@
package
public fun foo(): kotlin.Unit
public fun </*0*/ R> myRun(/*0*/ block: () -> R): R