Prohibit instantiation of annotation classes

#KT-3465 Fixed
This commit is contained in:
Natalia Ukhorskaya
2013-12-18 17:26:42 +04:00
parent 9fad61352b
commit 359f2ddbda
8 changed files with 85 additions and 0 deletions
@@ -575,6 +575,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest("compiler/testData/diagnostics/tests/annotations/BasicAnnotations.kt");
}
@TestMetadata("ConstructorCall.kt")
public void testConstructorCall() throws Exception {
doTest("compiler/testData/diagnostics/tests/annotations/ConstructorCall.kt");
}
@TestMetadata("Deprecated.kt")
public void testDeprecated() throws Exception {
doTest("compiler/testData/diagnostics/tests/annotations/Deprecated.kt");
@@ -43,6 +43,11 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/codegen/boxWithJava/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("javaAnnotationCall.kt")
public void testJavaAnnotationCall() throws Exception {
doTestWithJava("compiler/testData/codegen/boxWithJava/annotations/javaAnnotationCall.kt");
}
@TestMetadata("javaNegativePropertyAsAnnotationParameter.kt")
public void testJavaNegativePropertyAsAnnotationParameter() throws Exception {
doTestWithJava("compiler/testData/codegen/boxWithJava/annotations/javaNegativePropertyAsAnnotationParameter.kt");