[java] fix assertion condition

https://web.ea.pages.jetbrains.team/#/issue/396705
if method call provides explicit type arguments then no inference happens and there is no need in protection

GitOrigin-RevId: 062e4f6591bbdce03ed7ee8d666bea191bf1ba15
This commit is contained in:
Anna Kozlova
2022-07-06 11:45:25 +02:00
committed by intellij-monorepo-bot
parent 84f7fab27f
commit 4dc5c9a5b0
3 changed files with 31 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
import java.util.function.Function;
class MyTest {
<T> java.util.List<T> f(Function<T, String> ff) {
return null;
}
{
this.<String>f<caret>(s -> {
switch (s) {
case null :
System.out.println();
break;
default: return "";
}
});
}
}