mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Switch label: do not resolve unqualified enum constants referenced on the right side of arrow
Fixes IDEA-210771 Error message should be exposed for the new 'case' label in Java 12 in case of wrong constant usage
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import java.util.Random;
|
||||
|
||||
class SwitchExpressionsEnumResolve {
|
||||
enum E { E1, E2 }
|
||||
|
||||
E test(E e) {
|
||||
return switch (e) {
|
||||
case E1 -> <error descr="Cannot resolve symbol 'E2'">E2</error>;
|
||||
case E2 -> <error descr="Cannot resolve symbol 'E1'">E1</error>;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user