block lambda -> exp lambda: more accurate check for conflict (IDEA-129780)

This commit is contained in:
Anna Kozlova
2014-09-12 16:24:22 +04:00
parent e671b4599f
commit a9c44fb386
4 changed files with 64 additions and 2 deletions
@@ -0,0 +1,16 @@
// "Replace with expression lambda" "true"
class Test {
{
a(() -> new Object(){});
}
void a(Supplier<Object> s) {}
void a(AI<Object> s) {}
interface AI<K> {
void m();
}
interface Supplier<T> {
T get();
}
}
@@ -0,0 +1,18 @@
// "Replace with expression lambda" "true"
class Test {
{
a(() -> {
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();
}
}