block lambda -> expr: disable if found comments outside of expression (IDEA-131749)

This commit is contained in:
Anna Kozlova
2014-10-23 12:27:55 +02:00
parent 4ae41f73cf
commit fa2c07e579
4 changed files with 47 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
// "Replace with expression lambda" "true"
class Test {
{
Runnable r = () -> System.out.println(""//todo comment
);
}
}

View File

@@ -0,0 +1,19 @@
// "Replace with expression lambda" "false"
class Test {
{
a(() -> {
//my comment here
ret<caret>urn new Object(){};
});
}
void a(Supplier<Object> s) {}
void a(AI<Object> s) {}
interface AI<K> {
void m();
}
interface Supplier<T> {
T get();
}
}

View File

@@ -0,0 +1,9 @@
// "Replace with expression lambda" "true"
class Test {
{
Runnable r = () -> <caret>{
System.out.println(""//todo comment
);
};
}
}