[java] add move all members to class fix

GitOrigin-RevId: f5ad44f993f2f386c9847dc57ddac86cb4cf45d2
This commit is contained in:
Roman Ivanov
2023-09-07 08:56:35 +02:00
committed by intellij-monorepo-bot
parent 96dbed77fc
commit 31928210fc
12 changed files with 219 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
// "Move members into class" "true-preview"
class A {
int field = 12;
}

View File

@@ -0,0 +1,9 @@
// "Move members into class" "true-preview"
class A {
void foo() {
}
}

View File

@@ -0,0 +1,20 @@
// "Move members into class" "true-preview"
class A {
static {
System.out.println("initializer");
}
int x = 21;
String s = "asdsad";
void foo() {
}
void bar() {
}
}

View File

@@ -0,0 +1,8 @@
// "Move members into class" "true-preview"
int field<caret> = 12;
class A {
}

View File

@@ -0,0 +1,10 @@
// "Move members into class" "true-preview"
void foo<caret>() {
}
class A {
}

View File

@@ -0,0 +1,22 @@
// "Move members into class" "true-preview"
void foo<caret>() {
}
void bar<caret>() {
}
int x = 21;
String s = "asdsad";
static {
System.out.println("initializer");
}
class A {
}