Test for recursively annotated class object added

This commit is contained in:
Andrey Breslav
2014-03-25 21:23:27 +04:00
parent b3fb2e2314
commit 72b2fa77f7
2 changed files with 15 additions and 0 deletions
@@ -0,0 +1,10 @@
package test
annotation class AnnClass(val a: Class<*>)
class MyClass {
AnnClass(javaClass<MyClass>()) class object {
}
}
@@ -44,6 +44,11 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.TestsPackage", new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("ClassObjectAnnotatedWithItsClass.kt")
public void testClassObjectAnnotatedWithItsClass() throws Exception {
doTest("compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsClass.kt");
}
@TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant")
public static class AnnotationParameterMustBeConstant extends AbstractJetDiagnosticsTestWithStdLib {
public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception {