Fix invalidated element access exception in ObjectLiteralToLambdaIntention

#KT-36149 fixed
#KT-36152 fixed
This commit is contained in:
Ilya Kirillov
2020-02-14 10:02:36 +03:00
parent 6b913da698
commit 85be0450ba
7 changed files with 117 additions and 4 deletions
+28
View File
@@ -0,0 +1,28 @@
// Stubbed from Android Activity
class Activity {
public final void runOnUiThread(Runnable action) {
action.run();
}
}
public class Foo {
private Activity activity;
public void foo() {
synchronized (this) {
activity.runOnUiThread(new Runnable() {
public void run() {
}
});
}
}
public void bar() {
synchronized (this) {
activity.runOnUiThread(new Runnable() {
public void run() {
}
});
}
}
}