Fix parsing variable declaration in when subject

- parse destructuring declarations
- parse annotations on variable declaration in when subject
This commit is contained in:
Dmitry Petrov
2017-10-23 14:13:06 +03:00
parent 091b935c2d
commit 8aec99f4b5
7 changed files with 387 additions and 5 deletions
@@ -711,6 +711,18 @@ public class ParsingTestGenerated extends AbstractParsingTest {
runTest("compiler/testData/psi/When.kt");
}
@TestMetadata("WhenWithSubjectVariable.kt")
public void testWhenWithSubjectVariable() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/WhenWithSubjectVariable.kt");
doParsingTest(fileName);
}
@TestMetadata("WhenWithSubjectVariable_ERR.kt")
public void testWhenWithSubjectVariable_ERR() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/WhenWithSubjectVariable_ERR.kt");
doParsingTest(fileName);
}
@TestMetadata("When_ERR.kt")
public void testWhen_ERR() throws Exception {
runTest("compiler/testData/psi/When_ERR.kt");