[java] show user-friendly error message for patterns similar to calls in switch labels

GitOrigin-RevId: 09f4de4b1929950320511e853a00c2a3dc1e4fb0
This commit is contained in:
Roman Ivanov
2022-07-19 18:03:40 +00:00
committed by intellij-monorepo-bot
parent 914b662e53
commit f5621d553f
3 changed files with 30 additions and 2 deletions
@@ -25,7 +25,7 @@ public class Test {
String key = "key";
switch (key) {
case foo:
case <error descr="Cannot resolve symbol 'getStringValue'">getStringValue</error>(): {
case <error descr="Constant expression, pattern or null is required"><error descr="Cannot resolve symbol 'getStringValue'">getStringValue</error>()</error>: {
System.out.println("illegal");
break;
}