[java-intentions] Create record from deconstruction pattern, if the identifier is unresolved: fixes after IJ-CR-96419

IDEA-303300

GitOrigin-RevId: 683cfefb998c2a1f3a16d7874c166740ff21ac2f
This commit is contained in:
Andrey Cherkasov
2022-10-25 17:01:19 +04:00
committed by intellij-monorepo-bot
parent 3d2c425834
commit 970dd8d1e7
8 changed files with 48 additions and 77 deletions

View File

@@ -1,10 +1,7 @@
// "Create record 'Point'" "true-preview"
class Test {
void foo(Object obj) {
switch (obj) {
case Point(double x, double y) -> {}
default -> {}
}
if (obj instanceof Point(double x, double y)) {}
}
}

View File

@@ -1,9 +1,6 @@
// "Create record 'Point'" "true-preview"
class Test {
void foo(Object obj) {
switch (obj) {
case Poi<caret>nt(double x, double y) -> {}
default -> {}
}
if (obj instanceof Poi<caret>nt(double x, double y)) {}
}
}