JVM_IR KT-43812 erase generic arguments of SAM wrapper supertype

This commit is contained in:
Dmitry Petrov
2020-12-09 11:23:36 +03:00
parent 5daa406cdf
commit 313dfaf48c
10 changed files with 124 additions and 13 deletions
@@ -0,0 +1,16 @@
// WITH_SIGNATURES
// FILE: samGenericSuperinterface.kt
fun <T> genericSam(f: () -> T): T = J.g(f)
// FILE: J.java
public class J {
static <T> T g(Sam<T> s) {
return s.get();
}
}
// FILE: Sam.java
public interface Sam<T> {
T get();
}