Add regression test for KT-45905
This commit is contained in:
committed by
TeamCityServer
parent
c386b10f04
commit
24b6c5df56
+6
@@ -1840,6 +1840,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt45905.kt")
|
||||||
|
public void testKt45905() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt45905.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt46173.kt")
|
@TestMetadata("kt46173.kt")
|
||||||
public void testKt46173() throws Exception {
|
public void testKt46173() throws Exception {
|
||||||
|
|||||||
+6
@@ -1840,6 +1840,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt45905.kt")
|
||||||
|
public void testKt45905() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt45905.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt46173.kt")
|
@TestMetadata("kt46173.kt")
|
||||||
public void testKt46173() throws Exception {
|
public void testKt46173() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
// FULL_JDK
|
||||||
|
// ISSUE: KT-45905
|
||||||
|
|
||||||
|
// FILE: Ann.java
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.ElementType.FIELD;
|
||||||
|
import static java.lang.annotation.ElementType.METHOD;
|
||||||
|
|
||||||
|
@Target(value={ METHOD, FIELD })
|
||||||
|
public @interface Ann {
|
||||||
|
String[] cascade();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
class Temp {
|
||||||
|
@Ann(cascade = [<!UNRESOLVED_REFERENCE!>unresolved<!>])
|
||||||
|
var x: Int = 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
// FULL_JDK
|
||||||
|
// ISSUE: KT-45905
|
||||||
|
|
||||||
|
// FILE: Ann.java
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
import static java.lang.annotation.ElementType.FIELD;
|
||||||
|
import static java.lang.annotation.ElementType.METHOD;
|
||||||
|
|
||||||
|
@Target(value={ METHOD, FIELD })
|
||||||
|
public @interface Ann {
|
||||||
|
String[] cascade();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: main.kt
|
||||||
|
|
||||||
|
class Temp {
|
||||||
|
@Ann(cascade = <!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>[<!UNRESOLVED_REFERENCE!>unresolved<!>]<!>)
|
||||||
|
var x: Int = 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.FIELD}) public final annotation class Ann : kotlin.Annotation {
|
||||||
|
public constructor Ann(/*0*/ cascade: kotlin.Array<kotlin.String>)
|
||||||
|
public final val cascade: kotlin.Array<kotlin.String>
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Temp {
|
||||||
|
public constructor Temp()
|
||||||
|
@field:Ann(cascade = {}) public final var x: kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
Generated
+6
@@ -1846,6 +1846,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt45905.kt")
|
||||||
|
public void testKt45905() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt45905.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt46173.kt")
|
@TestMetadata("kt46173.kt")
|
||||||
public void testKt46173() throws Exception {
|
public void testKt46173() throws Exception {
|
||||||
|
|||||||
+5
@@ -1575,6 +1575,11 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt25876.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("kt45905.kt")
|
||||||
|
public void testKt45905() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt45905.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt46173.kt")
|
@TestMetadata("kt46173.kt")
|
||||||
public void testKt46173() throws Exception {
|
public void testKt46173() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt46173.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/typeUse/kt46173.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user