Files
kotlin-fork/compiler/testData/codegen/box/javaInterop/generics/javaNestedSamInterface.kt
T
Alexander Udalov 1071919706 Remove backend tests on old inference
Also remove any mentions of NewInference, and rename some tests.
2021-11-09 20:07:33 +01:00

23 lines
387 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// FILE: javaNestedSamInterface.kt
import test.A
fun box(): String = A<Int>(42).get<String> { "OK" }
// FILE: test/A.java
package test;
public class A<X extends Number> {
private final X x;
public A(X x) {
this.x = x;
}
public interface I<T> {
T compute();
}
public <T> T get(I<T> value) { return value.compute(); }
}