lambda: remove redundant code block inspection accept void compatible lambda & nested blocks (IDEA-91184)

This commit is contained in:
Anna Kozlova
2012-09-07 22:28:41 +04:00
parent 2156746537
commit 447bc37818
6 changed files with 63 additions and 13 deletions

View File

@@ -0,0 +1,6 @@
// "Replace with one line expression" "true"
class Test {
{
Runnable c = () -> System.out.println();
}
}

View File

@@ -0,0 +1,6 @@
// "Replace with one line expression" "true"
class Test {
{
Runnable c = () -> System.out.println();
}
}

View File

@@ -1,6 +1,6 @@
// "Replace with one line expression" "true"
class Test {
{
Comparable<String> c = (o) -> {r<caret>eturn 0};
Comparable<String> c = (o) -> {r<caret>eturn 0;};
}
}

View File

@@ -0,0 +1,6 @@
// "Replace with one line expression" "true"
class Test {
{
Runnable c = () -> <caret>{System.out.println();};
}
}

View File

@@ -0,0 +1,6 @@
// "Replace with one line expression" "true"
class Test {
{
Runnable c = () -> <caret>{{System.out.println();}};
}
}