mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
encapsulate fields: raise conflict if postfix/prefix expression result value is used further (IDEA-131841)
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
public class Test {
|
||||
int i;
|
||||
|
||||
{
|
||||
int k = i++;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Test {
|
||||
int i;
|
||||
|
||||
{
|
||||
int k = i++;
|
||||
}
|
||||
@@ -52,6 +52,10 @@ public class EncapsulateFieldsTest extends MultiFileTestCase{
|
||||
doTest("i", "There is already method <b><code>Super setI(int)</code></b> which differs from setter <b><code>setI</code></b> by return type only");
|
||||
}
|
||||
|
||||
public void testPostfixExpressionUsedInAssignment() throws Exception {
|
||||
doTest("i", "Unable to proceed with postfix/prefix expression when it's result type is used");
|
||||
}
|
||||
|
||||
public void testHideOverriderMethod() throws Exception {
|
||||
doTest("i", "A", "There is already a method <b><code>B.getI()</code></b> which would hide generated getter for a.i");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user