JVM: Only produce inline SAM wrappers in public inline scope

This commit is contained in:
Steven Schäfer
2021-01-26 18:20:44 +01:00
committed by Alexander Udalov
parent 50bbf4f269
commit c9b0cc5b32
16 changed files with 204 additions and 11 deletions
@@ -0,0 +1,11 @@
// KOTLIN_CONFIGURATION_FLAGS: SAM_CONVERSIONS=CLASS
// WITH_SIGNATURES
package test
// We used to generate SAM adapters inside of inline lambdas as
// inline SAM wrappers (`...$sam$i$...`). This is unnecessary, unless
// the code is itself contained in an inline function.
fun test() {
val lambda = { }
1.apply { Runnable(lambda) }
}