Make function delegated to sam adapter synthetic

This commit is contained in:
Natalia Ukhorskaya
2016-02-12 15:54:57 +03:00
parent 7fb1848bd5
commit 42927bb078
8 changed files with 77 additions and 2 deletions
@@ -0,0 +1,5 @@
package forTests;
public interface Computable <T> {
T compute();
}
@@ -15,4 +15,8 @@ public class MyJavaClass {
public static int staticFun(Object s) {
return 1;
}
public static <T> T runReadAction(@NotNull Computable<T> computation) {
return computation.compute();
}
}
@@ -0,0 +1,13 @@
package samAdapter
fun main(args: Array<String>) {
//Breakpoint!
val a = 1
runReadAction { 1 }
}
fun runReadAction(action: () -> Int): Int {
return forTests.MyJavaClass.runReadAction<Int>(action)
}
// STEP_INTO: 8