[Parser] Continue parsing if context receiver is not parsed correctly

This commit is contained in:
Anastasiya Shadrina
2021-02-18 17:21:12 +07:00
committed by TeamCityServer
parent 837f3b98fa
commit 5e426d5c16
6 changed files with 23 additions and 2 deletions
@@ -10630,6 +10630,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
runTest("compiler/testData/diagnostics/tests/extensions/contextReceivers/superWithContext.kt");
}
@Test
@TestMetadata("syntaxError.kt")
public void testSyntaxError() throws Exception {
runTest("compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.kt");
}
@Test
@TestMetadata("thisIdentifierInfo.kt")
public void testThisIdentifierInfo() throws Exception {
@@ -637,10 +637,10 @@ public class KotlinParsing extends AbstractKotlinParsing {
}
if (at(COMMA)) {
advance();
}
else {
} else {
if (!at(RPAR)) {
error("Expecting comma or ')'");
break;
}
}
}
@@ -0,0 +1,3 @@
context(
<!SYNTAX!><!>fun foo() {
}
@@ -0,0 +1,3 @@
context(
<!SYNTAX!><!>fun foo() {
}
@@ -0,0 +1,3 @@
package
public fun foo(): kotlin.Unit
@@ -10636,6 +10636,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/extensions/contextReceivers/superWithContext.kt");
}
@Test
@TestMetadata("syntaxError.kt")
public void testSyntaxError() throws Exception {
runTest("compiler/testData/diagnostics/tests/extensions/contextReceivers/syntaxError.kt");
}
@Test
@TestMetadata("thisIdentifierInfo.kt")
public void testThisIdentifierInfo() throws Exception {