lambda -> method ref: ensure that capture is checked according to the param ref; avoid wildcards in method ref qualifiers (IDEA-139529)

This commit is contained in:
Anna Kozlova
2015-04-24 12:00:00 +02:00
parent 4ce0d65554
commit e5097dfc24
3 changed files with 13 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
// "Replace lambda with method reference" "true"
import java.util.function.Function;
class Bar {
Function<Class<?> , String> s = Class::getCanonicalName;
}

View File

@@ -0,0 +1,5 @@
// "Replace lambda with method reference" "true"
import java.util.function.Function;
class Bar {
Function<Class<?> , String> s = (c) -> c.getCanonica<caret>lName();
}