KT-13146 J2K recursion while converting self-referenced anonymous functions (#956)

This commit is contained in:
Simon Ogorodnik
2016-09-26 13:47:31 +03:00
committed by Dmitry Jemerov
parent 33d33ab144
commit 47bfb8133d
8 changed files with 109 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
public class Test {
public Runnable someRunnable = new Runnable() {
@Override
public void run() {
someRunnable.run();
}
};
}
public class Test2 {
private Runnable someRunnable = new Runnable() {
@Override
public void run() {
someRunnable.run();
}
};
}
+15
View File
@@ -0,0 +1,15 @@
class Test {
var someRunnable: Runnable = object : Runnable {
override fun run() {
this.run()
}
}
}
class Test2 {
private val someRunnable = object : Runnable {
override fun run() {
this.run()
}
}
}
@@ -0,0 +1,11 @@
public class Test {
public void someMethod() {
Runnable someRunnable = new Runnable() {
@Override
public void run() {
someRunnable.run();
}
};
}
}
@@ -0,0 +1,9 @@
class Test {
fun someMethod() {
val someRunnable = object : Runnable {
override fun run() {
this.run()
}
}
}
}