Add test for KT-25489 (to reproduce, turn UL classes OFF)

This commit is contained in:
Mikhail Glukhikh
2020-12-25 10:04:21 +03:00
parent 532124d9a1
commit 776c4ba6ca
5 changed files with 56 additions and 0 deletions
@@ -147,6 +147,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/annotations/kt10136.kt");
}
@TestMetadata("kt25489.kt")
public void testKt25489() throws Exception {
runTest("compiler/testData/codegen/box/annotations/kt25489.kt");
}
@TestMetadata("mustBeDocumented.kt")
public void testMustBeDocumented() throws Exception {
runTest("compiler/testData/codegen/box/annotations/mustBeDocumented.kt");
+36
View File
@@ -0,0 +1,36 @@
// FILE: JavaImpl.java
public class JavaImpl implements KotlinInterface {
private final String id;
JavaImpl(String id) {
this.id = id;
}
@Override
public String id() {
return id;
}
}
// FILE: JavaAnnotation.java
public @interface JavaAnnotation {
public Class<?> as() default Void.class;
}
// FILE: kt25489.kt
// TARGET_BACKEND: JVM
// Note: if you wish to reproduce KT-25489, turn UL classes OFF
@JavaAnnotation(`as` = JavaImpl::class)
interface KotlinInterface : Identity
interface Identity {
fun id(): String
}
fun box(): String {
val impl = JavaImpl("OK")
return impl.id()
}
@@ -147,6 +147,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/annotations/kt10136.kt");
}
@TestMetadata("kt25489.kt")
public void testKt25489() throws Exception {
runTest("compiler/testData/codegen/box/annotations/kt25489.kt");
}
@TestMetadata("mustBeDocumented.kt")
public void testMustBeDocumented() throws Exception {
runTest("compiler/testData/codegen/box/annotations/mustBeDocumented.kt");
@@ -147,6 +147,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/annotations/kt10136.kt");
}
@TestMetadata("kt25489.kt")
public void testKt25489() throws Exception {
runTest("compiler/testData/codegen/box/annotations/kt25489.kt");
}
@TestMetadata("mustBeDocumented.kt")
public void testMustBeDocumented() throws Exception {
runTest("compiler/testData/codegen/box/annotations/mustBeDocumented.kt");
@@ -147,6 +147,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/annotations/kt10136.kt");
}
@TestMetadata("kt25489.kt")
public void testKt25489() throws Exception {
runTest("compiler/testData/codegen/box/annotations/kt25489.kt");
}
@TestMetadata("mustBeDocumented.kt")
public void testMustBeDocumented() throws Exception {
runTest("compiler/testData/codegen/box/annotations/mustBeDocumented.kt");