Support non-parenthesized annotations on functional types without receiver

^KT-31734 Fixed
This commit is contained in:
victor.petukhov
2019-07-05 19:02:05 +03:00
parent 60e3787800
commit 6a679d86ab
32 changed files with 11735 additions and 11 deletions
@@ -1166,6 +1166,34 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
}
}
@TestMetadata("compiler/testData/diagnostics/tests/annotations/functionalTypes")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class FunctionalTypes extends AbstractDiagnosticsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInFunctionalTypes() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/functionalTypes"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true);
}
@TestMetadata("nonParenthesizedAnnotationsWithError.kt")
public void testNonParenthesizedAnnotationsWithError() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/functionalTypes/nonParenthesizedAnnotationsWithError.kt");
}
@TestMetadata("nonParenthesizedAnnotationsWithoutError.kt")
public void testNonParenthesizedAnnotationsWithoutError() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/functionalTypes/nonParenthesizedAnnotationsWithoutError.kt");
}
@TestMetadata("parenthesizedAnnotations.kt")
public void testParenthesizedAnnotations() throws Exception {
runTest("compiler/testData/diagnostics/tests/annotations/functionalTypes/parenthesizedAnnotations.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/tests/annotations/options")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)