inline local: don't check assignability before decoding (IDEA-152883)

This commit is contained in:
Anna.Kozlova
2016-03-24 15:58:41 +01:00
parent 4fad450347
commit ca2921eb6e
4 changed files with 38 additions and 3 deletions
@@ -0,0 +1,15 @@
class Outer {
public void bar() {
Outer foo = this;
new Object() {
public void run() {
f<caret>oo.baz();
}
};
}
public void baz() {
}
}
@@ -0,0 +1,14 @@
class Outer {
public void bar() {
new Object() {
public void run() {
Outer.this.baz();
}
};
}
public void baz() {
}
}
@@ -256,6 +256,10 @@ public class InlineLocalTest extends LightCodeInsightTestCase {
doTest(true);
}
public void testDecodeRefsBeforeCheckingOverRedundantCasts() throws Exception {
doTest(true);
}
public void testLocalVarInsideLambdaBodyWriteUsage() throws Exception {
doTest(true, "Cannot perform refactoring.\n" +
"Variable 'hello' is accessed for writing");