JVM_IR indy-SAM: function reference to Java interface
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_TARGET: 1.8
|
||||
// SAM_CONVERSIONS: INDY
|
||||
// FILE: extensionLambda2.kt
|
||||
fun samExtLambda(ext: String.(String) -> String) = Sam(ext)
|
||||
|
||||
fun box(): String {
|
||||
val oChar = 'O'
|
||||
return samExtLambda { oChar.toString() + this + it }.get("", "K")
|
||||
}
|
||||
|
||||
// FILE: Sam.java
|
||||
public interface Sam {
|
||||
String get(String s1, String s2);
|
||||
}
|
||||
Reference in New Issue
Block a user