Files
kotlin-fork/compiler/testData/codegen/bytecodeListing/deserializeLambdaMethod.kt
T
Alexander Udalov 968dfddbc9 Tests: adjust test data for bytecode listing tests
- remove obsolete `IGNORE_BACKEND: JVM` directives
- move contents of .ir.txt files to the corresponding .txt
2023-11-02 10:59:29 +00:00

16 lines
467 B
Kotlin
Vendored

// FILE: deserializeLambdaMethod.kt
fun plusK(s: String) = s + "K"
// Creating a serializable lambda causes '$deserializeLambda$' method to be generated in the corresponding class.
// Given equivalent code, javac generates
// private static synthetic $deserializeLambda$(Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object;
val test = Sam(::plusK)
// FILE: Sam.java
import java.io.*;
public interface Sam extends Serializable {
String get(String s);
}