Add JVM ABI K1/K2 consistency tests
This commit is contained in:
committed by
Space Team
parent
5a1fb78fcd
commit
34bac48541
+15
@@ -0,0 +1,15 @@
|
||||
MODULE main
|
||||
CLASS Anno.class
|
||||
CLASS METADATA
|
||||
PROPERTY k()Ljava/lang/String;
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
public final
|
||||
K2
|
||||
public final /* non-default */
|
||||
PROPERTY o()Ljava/lang/String;
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
public final
|
||||
K2
|
||||
public final /* non-default */
|
||||
@@ -1,5 +1,6 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63843
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
MODULE main
|
||||
CLASS E$E1.class
|
||||
Annotation: class.visibleAnnotations
|
||||
K1
|
||||
@LFirst;
|
||||
K2
|
||||
---
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
// WITH_STDLIB
|
||||
// KT-5665
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62470
|
||||
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class First
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
MODULE main
|
||||
CLASS PrivateProperties.class
|
||||
CLASS METADATA
|
||||
PROPERTY getX8()Ljava/lang/String;
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
PROPERTY x2
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
PROPERTY x3
|
||||
Property: class.metadata.property.setterModifiers
|
||||
K1
|
||||
private final /* non-default */
|
||||
K2
|
||||
private final
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
---
|
||||
PROPERTY x4
|
||||
Property: class.metadata.property.setterModifiers
|
||||
K1
|
||||
private final /* non-default */
|
||||
K2
|
||||
private final
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
---
|
||||
PROPERTY y0
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
private final
|
||||
K2
|
||||
private final /* non-default */
|
||||
PROPERTY y1
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
private final
|
||||
K2
|
||||
private final /* non-default */
|
||||
CLASS EffetivelyPrivate.class
|
||||
CLASS METADATA
|
||||
PROPERTY getX0()I
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
public final
|
||||
K2
|
||||
public final /* non-default */
|
||||
PROPERTY getX1()I
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
protected final
|
||||
K2
|
||||
protected final /* non-default */
|
||||
PROPERTY getX2$main()I
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
internal final
|
||||
K2
|
||||
internal final /* non-default */
|
||||
CLASS Statics$Companion.class
|
||||
CLASS METADATA
|
||||
PROPERTY getX2()Ljava/lang/String;
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// WITH_REFLECT
|
||||
// TARGET_BACKEND: JVM
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63850, KT-63851, KT-63852, KT-63843, different naming of setter parameters
|
||||
|
||||
// Please make sure that this test is consistent with the diagnostic test "annotationsTargetingNonExistentAccessor.kt"
|
||||
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
MODULE main
|
||||
CLASS AnnotationInstancesKt.class
|
||||
Annotation: class.invisibleAnnotations
|
||||
K1
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
annotationInstances.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 annotationInstances.kt
|
||||
AnnotationInstancesKt
|
||||
+ 2 ArrayIntrinsics.kt
|
||||
kotlin/ArrayIntrinsicsKt
|
||||
*L
|
||||
1#1,76:1
|
||||
26#2:77
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 annotationInstances.kt
|
||||
AnnotationInstancesKt
|
||||
*L
|
||||
51#1:77
|
||||
*E
|
||||
} )
|
||||
K2
|
||||
---
|
||||
@@ -6,6 +6,8 @@
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: +InstantiationOfAnnotationClasses
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62465
|
||||
|
||||
// note: taken from ../parameters.kt and ../parametersWithPrimitiveValues.kt
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
MODULE main
|
||||
CLASS test/AnnotationToStringKt.class
|
||||
Annotation: class.invisibleAnnotations
|
||||
K1
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
annotationToString.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 annotationToString.kt
|
||||
test/AnnotationToStringKt
|
||||
+ 2 ArrayIntrinsics.kt
|
||||
kotlin/ArrayIntrinsicsKt
|
||||
*L
|
||||
1#1,62:1
|
||||
26#2:63
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 annotationToString.kt
|
||||
test/AnnotationToStringKt
|
||||
*L
|
||||
51#1:63
|
||||
*E
|
||||
} )
|
||||
K2
|
||||
---
|
||||
@@ -10,6 +10,8 @@
|
||||
// WITH_STDLIB
|
||||
// !LANGUAGE: +InstantiationOfAnnotationClasses
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62465
|
||||
|
||||
package test
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
MODULE main
|
||||
CLASS C.class
|
||||
CLASS METADATA
|
||||
PROPERTY getSynth2()I
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
public final /* non-default */
|
||||
K2
|
||||
public final
|
||||
Property: class.metadata.property.setterModifiers
|
||||
K1
|
||||
public final /* non-default */
|
||||
K2
|
||||
public final
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/Int
|
||||
K2
|
||||
---
|
||||
PROPERTY getSynth4()I
|
||||
Property: class.metadata.property.getterModifiers
|
||||
K1
|
||||
public final /* non-default */
|
||||
K2
|
||||
public final
|
||||
Property: class.metadata.property.setterModifiers
|
||||
K1
|
||||
public final /* non-default */
|
||||
K2
|
||||
public final
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/Int
|
||||
K2
|
||||
---
|
||||
@@ -3,6 +3,8 @@
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63853, KT-63854
|
||||
|
||||
import java.lang.reflect.Modifier
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
|
||||
Reference in New Issue
Block a user