JVM_IR KT-50856 fix generic signature for SAM proxy function

This commit is contained in:
Dmitry Petrov
2022-01-20 10:26:45 +03:00
committed by Space
parent cd578e9d13
commit 12d8b189a9
6 changed files with 62 additions and 11 deletions
@@ -1,4 +1,6 @@
// IGNORE_BACKEND: JVM
// WITH_SIGNATURES
// WITH_STDLIB
// FILE: indySamConversionViaProxyFun.kt.kt
inline fun ifn() {}
@@ -14,10 +16,15 @@ fun test() {
// Proxy function for arrayOf fun should be non-synthetic
use(Sam3(::intArrayOf))
// Proxy function for generic fun should have valid generic signature
use4<Map<String, String>>(::mutableMapOf)
}
fun use(x: Any) {}
fun <U> use4(x: Sam4<U>) {}
// FILE: Sam1.java
public interface Sam1 {
String get(String x, Object y);
@@ -31,4 +38,9 @@ public interface Sam2 {
// FILE: Sam3.java
public interface Sam3 {
int[] get(int[] s);
}
}
// FILE: Sam4.java
public interface Sam4<T> {
T get();
}