Return correct PSI expression for EmptyLabeledReturn

Fixes diagnostic reporting for appropriate constraint error
#kt-32792 fixed
This commit is contained in:
Ilya Chernikov
2020-01-21 17:41:44 +01:00
parent ca150005a8
commit a1acb4afaf
7 changed files with 40 additions and 1 deletions
@@ -0,0 +1,10 @@
// !LANGUAGE: +NewInference
inline fun <T> tryLambdas(lamb : () -> T) : T{
return lamb.invoke()
}
fun main() {
tryLambdas<String> {
<!TYPE_MISMATCH!>return@tryLambdas<!>
}
}
@@ -0,0 +1,10 @@
// !LANGUAGE: +NewInference
inline fun <T> tryLambdas(lamb : () -> T) : T{
return lamb.invoke()
}
fun main() {
tryLambdas<String> {
<!TYPE_MISMATCH!>return@tryLambdas<!>
}
}
@@ -0,0 +1,4 @@
package
public fun main(): kotlin.Unit
public inline fun </*0*/ T> tryLambdas(/*0*/ lamb: () -> T): T