JVM_IR make $deserializeLambda$ method synthetic
This commit is contained in:
committed by
teamcityserver
parent
1dbbe22c8c
commit
6e9cbf52b1
@@ -0,0 +1,17 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user