mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
[java] More tests for preview; minor fixes
GitOrigin-RevId: 7f72c5f68ab821e728eb0d5152f0910f48035046
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7a1f179f41
commit
9c6aeba5b4
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
void foo () {
|
||||
int i = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
void foo (int y) {
|
||||
int i;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
void foo (int y) {
|
||||
int i = 0;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
public void foo() {
|
||||
int i;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
public void foo() {
|
||||
int i;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// "Bring 'String con' into scope" "true"
|
||||
// "Bring 'String con' into scope" "true-preview"
|
||||
class a {
|
||||
private void ffff(String c) {
|
||||
String con = null;
|
||||
try {
|
||||
con = null;
|
||||
} finally {
|
||||
ffff(con); // This method doesn't mind con == null.
|
||||
ffff(con);// This method doesn't mind con == null.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int j' into scope" "true"
|
||||
// "Bring 'int j' into scope" "true-preview"
|
||||
class a {
|
||||
void foo() {
|
||||
int j;
|
||||
@@ -6,6 +6,6 @@ class a {
|
||||
int i;
|
||||
j = 10;
|
||||
}
|
||||
System.out.println(<caret>j); // invoke "bring 'int j' into scope" quickfix here
|
||||
System.out.println(<caret>j);// invoke "bring 'int j' into scope" quickfix here
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'String msg' into scope" "true"
|
||||
// "Bring 'String msg' into scope" "true-preview"
|
||||
public class BringVarIntoScope {
|
||||
public void moveVariableDeclarationOutOfBlock(boolean b) {
|
||||
String msg;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
void foo () {
|
||||
try {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
void foo (int y) {
|
||||
while (y != 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
void foo (int y) {
|
||||
while (y != 0) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
public void foo() {
|
||||
if (true) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'int i' into scope" "true"
|
||||
// "Bring 'int i' into scope" "true-preview"
|
||||
class a {
|
||||
public void foo() {
|
||||
for (int i = 0; i < 10; i++) { }
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// "Bring 'String con' into scope" "true"
|
||||
// "Bring 'String con' into scope" "true-preview"
|
||||
class a {
|
||||
private void ffff(String c){
|
||||
try { String con = null; }
|
||||
finally {
|
||||
ffff(<caret>con); // This method doesn't mind con == null.
|
||||
ffff(<caret>con);// This method doesn't mind con == null.
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
// "Bring 'int j' into scope" "true"
|
||||
// "Bring 'int j' into scope" "true-preview"
|
||||
class a {
|
||||
void foo() {
|
||||
{
|
||||
int i, j = 10;
|
||||
}
|
||||
System.out.println(<caret>j); // invoke "bring 'int j' into scope" quickfix here
|
||||
System.out.println(<caret>j);// invoke "bring 'int j' into scope" quickfix here
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Bring 'String msg' into scope" "true"
|
||||
// "Bring 'String msg' into scope" "true-preview"
|
||||
public class BringVarIntoScope {
|
||||
public void moveVariableDeclarationOutOfBlock(boolean b) {
|
||||
if (b) {
|
||||
|
||||
Reference in New Issue
Block a user