java: disable heavy weight add type cast for lambda bodies with failed inference on top

for long chained calls with many type errors, DFA checks may be too slow

GitOrigin-RevId: 851604a1252743c92d8c33973845cdda7bbb996a
This commit is contained in:
Anna Kozlova
2019-08-12 19:04:15 +03:00
committed by intellij-monorepo-bot
parent b2e0f2a958
commit c1b79848e1
2 changed files with 34 additions and 0 deletions
@@ -0,0 +1,19 @@
// "Cast qualifier to 'java.lang.String'" "false"
class A {
interface I<T> {
void m(T t);
}
void method() {
CharSequence cs = "";
int p = foo(s -> {
if (s instanceof String) {
s.subs<caret>tring(1);
}
}, cs);
}
<K> K foo(I<K> i, K k) {
return null;
}
}