psi2ir: Fix return insertion

We should only insert a return statement at the end of a lambda or
function if the final statement is used as an expression (slice
USED_AS_RESULT_OF_LAMBDA and USED_AS_EXPRESSION).
This commit is contained in:
Steven Schäfer
2019-10-24 09:50:50 +02:00
committed by Dmitry Petrov
parent b3e733ea4f
commit 0da4b06074
19 changed files with 127 additions and 72 deletions
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
// FILE: 1.kt
package builders
@@ -1,6 +1,6 @@
// FILE: 1.kt
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
package builders
inline fun call(crossinline init: () -> Unit) {
@@ -1,4 +1,4 @@
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
// FILE: 1.kt
package test