mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[java-parser] IDEA-332589 Support when as identifier in patterns
- allow to use `when` after type test patterns. Deconstruction pattern is supposed to have when as keyword afterward GitOrigin-RevId: 4c385125385238f9ea69bc8f69279e8900a2a9e5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2f980484c8
commit
9fed3df3e2
@@ -157,6 +157,10 @@ public abstract class AbstractBasicStatementParserTest extends AbstractBasicJava
|
||||
public void testSwitchRulesWithPattern6() { doParserTest("case Integer i when true -> { }"); }
|
||||
public void testSwitchRulesWithPattern7() { doParserTest("case R(int i) when true -> {}"); }
|
||||
public void testSwitchRulesWithPattern8() { doParserTest("case R(int i) when a < b -> {}"); }
|
||||
public void testSwitchRulesWithPattern9() { doParserTest("case A when when when.foo() -> {}"); }
|
||||
public void testSwitchRulesWithPattern10() { doParserTest("case when(boolean when) when when -> {}"); }
|
||||
public void testSwitchRulesWithPattern11() { doParserTest("case when when when when(when) -> {}"); }
|
||||
public void testSwitchRulesWithPattern12() { doParserTest("case when when -> {}"); }
|
||||
public void testSwitchRulesWithPatternIncomplete1() { doParserTest("case (Integer i -> { }"); }
|
||||
public void testSwitchRulesWithPatternIncomplete2() { doParserTest("case Integer i, -> { }"); }
|
||||
public void testSwitchRulesWithPatternIncomplete3() { doParserTest("case Integer i when -> { }"); }
|
||||
|
||||
@@ -11,6 +11,8 @@ public abstract class AbstractBasicSwitchParsingTest extends AbstractBasicJavaPa
|
||||
}
|
||||
|
||||
public void testNormal() { doTest(true); }
|
||||
public void testNormalManyWhen() { doTest(true); }
|
||||
|
||||
|
||||
public void testUncomplete1() { doTest(true); }
|
||||
public void testUncomplete2() { doTest(true); }
|
||||
|
||||
Reference in New Issue
Block a user