KT-55288: Add diagnostics test showing that issue is fixed in K2
^KT-55288: Fixed
This commit is contained in:
committed by
Space Team
parent
0f179e8949
commit
965015bb1e
+6
@@ -1098,6 +1098,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("AnnotatedNullableTypes.kt")
|
||||||
|
public void testAnnotatedNullableTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedNullableTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("AnnotatedResultType.kt")
|
@TestMetadata("AnnotatedResultType.kt")
|
||||||
public void testAnnotatedResultType() throws Exception {
|
public void testAnnotatedResultType() throws Exception {
|
||||||
|
|||||||
+6
@@ -1098,6 +1098,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("AnnotatedNullableTypes.kt")
|
||||||
|
public void testAnnotatedNullableTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedNullableTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("AnnotatedResultType.kt")
|
@TestMetadata("AnnotatedResultType.kt")
|
||||||
public void testAnnotatedResultType() throws Exception {
|
public void testAnnotatedResultType() throws Exception {
|
||||||
|
|||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
annotation class Ann
|
||||||
|
|
||||||
|
val a: <!WRONG_ANNOTATION_TARGET!>@Ann<!> String? = ""
|
||||||
|
val b: (<!WRONG_ANNOTATION_TARGET!>@Ann<!> String)? = "" // false negative in K1, OK in K2
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.TYPE)
|
||||||
|
annotation class TypeAnn
|
||||||
|
|
||||||
|
val c: @TypeAnn String? = ""
|
||||||
|
val d: (@TypeAnn String)? = ""
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
annotation class Ann
|
||||||
|
|
||||||
|
val a: <!WRONG_ANNOTATION_TARGET!>@Ann<!> String? = ""
|
||||||
|
val b: (@Ann String)? = "" // false negative in K1, OK in K2
|
||||||
|
|
||||||
|
@Target(AnnotationTarget.TYPE)
|
||||||
|
annotation class TypeAnn
|
||||||
|
|
||||||
|
val c: @TypeAnn String? = ""
|
||||||
|
val d: (@TypeAnn String)? = ""
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public val a: @Ann kotlin.String? = ""
|
||||||
|
public val b: @Ann kotlin.String? = ""
|
||||||
|
public val c: @TypeAnn kotlin.String? = ""
|
||||||
|
public val d: @TypeAnn kotlin.String? = ""
|
||||||
|
|
||||||
|
public final annotation class Ann : kotlin.Annotation {
|
||||||
|
public constructor Ann()
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.TYPE}) public final annotation class TypeAnn : kotlin.Annotation {
|
||||||
|
public constructor TypeAnn()
|
||||||
|
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
@@ -1098,6 +1098,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt");
|
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("AnnotatedNullableTypes.kt")
|
||||||
|
public void testAnnotatedNullableTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedNullableTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("AnnotatedResultType.kt")
|
@TestMetadata("AnnotatedResultType.kt")
|
||||||
public void testAnnotatedResultType() throws Exception {
|
public void testAnnotatedResultType() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user