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

This commit is contained in:
Anna Kozlova
2014-09-12 15:08:04 +04:00
parent e671b4599f
commit a9c44fb386
4 changed files with 64 additions and 2 deletions

View File

@@ -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();
}
}

View File

@@ -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();
}
}