mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-21 22:11:40 +07:00
[java] [switch expressions] avoid dbl work when checking types of switch return expressions
IJ-CR-14340 GitOrigin-RevId: 40e79767d794f7b7fcc9bc4d3930051a1698ea86
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3434af89eb
commit
49edf8a29d
@@ -110,6 +110,10 @@ class MyTest {
|
||||
case 0 -> 42;
|
||||
default -> <error descr="Expression type should not be 'void'">System.out.println(42)</error>;
|
||||
};
|
||||
|
||||
<error descr="Cannot infer type: variable initializer is 'null'">var</error> rv1 = switch (0) {
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
static void test(boolean b, int i) {
|
||||
|
||||
Reference in New Issue
Block a user