inline: do not mess with qualifiers statically imported members (IDEA-83713)

This commit is contained in:
anna
2012-04-06 20:33:01 +02:00
parent 0c75f95c10
commit c660378357
4 changed files with 47 additions and 10 deletions
@@ -0,0 +1,17 @@
package p;
import static p.C.mock;
class C {
public static String mock() {
return null;
}
}
class D {
public static final String CONST = mock();
}
class QTest {
public static void main(String[] args) {
String s = D.CON<caret>ST;
}
}
@@ -0,0 +1,16 @@
package p;
import static p.C.mock;
class C {
public static String mock() {
return null;
}
}
class D {
}
class QTest {
public static void main(String[] args) {
String s = mock();
}
}
@@ -26,6 +26,10 @@ public class InlineConstantFieldTest extends LightRefactoringTestCase {
public void testQualifiedConstantExpressionReplacedWithAnotherOne() throws Exception {
doTest();
}
public void testStaticallyImportedQualifiedExpression() throws Exception {
doTest();
}
private void doTest() throws Exception {
String name = getTestName(false);