JVM: do not write trivial SMAPs to classes outside inline funs

where trivial == those that map the file to itself.
This commit is contained in:
pyos
2020-04-23 14:42:22 +02:00
committed by max-kammerer
parent a04aeeb4e1
commit d17a18f96d
30 changed files with 121 additions and 204 deletions
@@ -0,0 +1,16 @@
// FILE: 1.kt
package test
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
@kotlin.internal.InlineOnly
inline fun <T, R> T.myLet(block: (T) -> R) = block(this)
// FILE: 2.kt
import test.*
fun box(): String {
val k = "".myLet { it + "K" }
return "O".myLet(fun (it: String): String { return it + k })
}
// FILE: 2.smap