Files
kotlin/compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt
Dmitry Petrov 0db6e5c3f3 Fix SAM wrapper generation in secondary constructor calls
Should simply invoke 'checkSamCall' in corresponding visitor method to
check if call arguments should be wrapped.
2017-12-04 10:29:33 +03:00

24 lines
423 B
Kotlin
Vendored

// FILE: test.kt
class Test : Base {
constructor(f: () -> String) : super(f)
}
fun box() = Test({ "OK" }).get()
// 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();
}
}