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,10 @@
// KOTLIN_CONFIGURATION_FLAGS: SAM_CONVERSIONS=CLASS
// WITH_SIGNATURES
package test
// SAM adapters inside of private inline functions don't need to be public,
// since we do not refer to them from other packages.
fun test() {
val lambda = { }
1.apply { Runnable(lambda) }
}