Remove error on annotated types as arguments to typeOf

Instead, document that `KType.annotations` returns an empty list for
types created with `typeOf`. Annotations might be supported in the
future.

 #KT-49573 Fixed
 #KT-29919
This commit is contained in:
Alexander Udalov
2021-11-11 18:10:20 +01:00
parent 2aa027639c
commit 850d76f6bf
18 changed files with 180 additions and 134 deletions
@@ -38917,6 +38917,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("annotatedType.kt")
public void testAnnotatedType() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/annotatedType.kt");
}
@Test
@TestMetadata("classes.kt")
public void testClasses() throws Exception {
@@ -39026,6 +39032,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("annotatedType.kt")
public void testAnnotatedType() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/annotatedType.kt");
}
@Test
@TestMetadata("classes.kt")
public void testClasses() throws Exception {