void () { myFixture.configureByText("Foo.java", """ interface Supplier<T> { T get();}class Foo { { Supplier<Runnable> x = foo ((<caret>) -> () -> {});} static <T> Supplier<T> foo(Supplier<T> delegate) { return null; } }"""); final PsiElement elementAtCaret = myFixture.getFile().findElementAt(myFixture.getCaretOffset()); assertNotNull(elementAtCaret); final PsiExpression psiExpression = PsiTreeUtil.getParentOfType(elementAtCaret, PsiExpression.class); assertInstanceOf(psiExpression, PsiLambdaExpression.class); final PsiClass aClass = myFixture.findClass("Foo"); assertNotNull(aClass); final PsiMethod[] meths = aClass.findMethodsByName("foo", false); assertEquals(1, meths.length); assertFalse(InferenceSession.isPertinentToApplicability(psiExpression, meths[0])); }