[java-refactoring] IDEA-340087 produce accurate PsiType for implicit classes

- fix Introduce variable throws exception in implicit classes

GitOrigin-RevId: c3489b1c6df3669f01b6e5defbf8a2208a7b441d
This commit is contained in:
Mikhail Pyltsin
2023-12-07 16:42:56 +01:00
committed by intellij-monorepo-bot
parent 6a7355dae7
commit 7ed93305c1
7 changed files with 26 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ public class C {
private final String myStr;
public C() {
myStr = "";
String strings = myStr;
strings = "";
}
}

View File

@@ -0,0 +1,8 @@
class Nested {
}
void main() {
Class<Nested> x = Nested.class;
System.out.println(x);
}

View File

@@ -0,0 +1,7 @@
class Nested {
}
void main() {
System.out.println(<selection>Nested.class</selection>);
}

View File

@@ -1,5 +1,5 @@
class cTest {
{
cTest cTest = new cTest();<caret>
cTest <caret>cTest = new cTest();
}
}

View File

@@ -7,8 +7,7 @@ class C {
void test () {
C c = new C();
String wrong = c.f();
for (; wrong != null;) {
for (;c.f() != null;) {
c = c.getParent();
}
}