Files
kotlin-fork/compiler/testData/codegen/box/sam/constructors/kt19251.kt
T
Dmitry Petrov 67336653e0 Generate SAM wrappers only if they are required for a given argument
SAM interface wrapper for an argument is required,
if in the function descriptor for SAM adapter
type for the corresponding value parameter
doesn't match type of the corresponding value parameter
in the original (Java) descriptor.

 #KT-19251 Fixed Target versions 1.1.5
2017-07-28 08:24:46 +03:00

14 lines
282 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FULL_JDK
// FILE: test.kt
fun box(): String {
val map = mutableMapOf<Fun, String>()
val fn = Fun { TODO() }
return map.computeIfAbsent(fn, { "OK" })
}
// FILE: Fun.java
public interface Fun {
String invoke(String string);
}