lambda potential compatibility: don't treat array creation as void compatible

array creation can't be used as expression statement thus corresponding lambda body is value compatible but not void compatible

GitOrigin-RevId: b0ddccad13c8699de64c4ce3e584214fe08a2353
This commit is contained in:
Anna Kozlova
2019-04-24 09:48:18 +02:00
committed by intellij-monorepo-bot
parent 7fdfe09817
commit 00fbf3d133
3 changed files with 17 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
interface A {
void enableInspections(B... providers);
void enableInspections(Runnable r, String... inspections);
}
interface B {
Class[] get();
}
class C {
void foo(A a) {
a.enableInspections(() -> new Class[]{});
}
}