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
@@ -30925,6 +30925,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("annotatedType.kt")
public void testAnnotatedType() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/annotatedType.kt");
}
@TestMetadata("classes.kt")
public void testClasses() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/classes.kt");
@@ -31025,6 +31030,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeOf/noReflect"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@TestMetadata("annotatedType.kt")
public void testAnnotatedType() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/annotatedType.kt");
}
@TestMetadata("classes.kt")
public void testClasses() throws Exception {
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/classes.kt");