Report error on annotated type inside typeOf on JVM
Since it's not feasible to support annotated types in 1.6, we're making this an explicit error in 1.6, so that typeOf can become stable and this feature can be supported in the future without breaking changes to the existing code. Note that extension function types are a special case of annotated types. A separate error is created for them just because the message "annotated types are not supported" would be confusing, since such types don't have explicit annotations in the source code. #KT-29919
This commit is contained in:
+6
@@ -672,6 +672,12 @@ public class DiagnosticsTestWithJvmIrBackendGenerated extends AbstractDiagnostic
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/typeOf"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("annotatedType.kt")
|
||||
public void testAnnotatedType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/typeOf/annotatedType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("nonReifiedTypeParameterWithRecursiveBound.kt")
|
||||
public void testNonReifiedTypeParameterWithRecursiveBound() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user