Disable lambda2methodref if lambda parameter has annotations; preserve annotations in extract to methodref

Fixes IDEA-200489 Replacing lambda with method reference discards annotation on Java 11 var lambda parameter

GitOrigin-RevId: 78bf5f00389f8e1e8a866fbaa226cea2e31b749c
This commit is contained in:
Tagir Valeev
2020-05-21 18:03:27 +07:00
committed by intellij-monorepo-bot
parent fc3d01378e
commit 8ddeb2cd07
12 changed files with 138 additions and 7 deletions

View File

@@ -0,0 +1,6 @@
// "Replace lambda with method reference" "false"
import java.util.function.Consumer;
class Test {
Consumer<Integer> c = (@Nonnull Integer i) -> System<caret>.out.println(i);
}