Files
kotlin-fork/compiler/testData/codegen/box/sam/adapters/superInSecondaryConstructor.kt
T
Alexander Udalov 401f0ac583 Use TARGET_BACKEND instead of DONT_TARGET_EXACT_BACKEND in box against Java tests
"// TARGET_BACKEND: JVM" more clearly says that the test is
JVM-specific, rather than DONT_TARGET_EXACT_BACKEND which excludes all
other backends.
2021-02-11 13:50:08 +01:00

28 lines
483 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// MODULE: lib
// FILE: Supplier.java
public interface Supplier<T> {
T get();
}
// FILE: Base.java
public class Base {
private final Supplier<String> supplier;
public Base(Supplier<String> supplier) {
this.supplier = supplier;
}
public String get() {
return supplier.get();
}
}
// MODULE: main(lib)
// FILE: test.kt
class Test : Base {
constructor(f: () -> String) : super(f)
}
fun box() = Test({ "OK" }).get()