Add JVM ABI K1/K2 consistency tests
This commit is contained in:
committed by
Space Team
parent
5a1fb78fcd
commit
34bac48541
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS NullableReceiverInEqualsKt.class
|
||||
PACKAGE METADATA
|
||||
PROPERTY getA_foo()Lkotlin/reflect/KFunction;
|
||||
Property: class.metadata.property.returnType
|
||||
K1
|
||||
kotlin/reflect/KFunction1<A, kotlin/Unit>
|
||||
K2
|
||||
@kotlin/ExtensionFunctionType kotlin/reflect/KFunction1<A, kotlin/Unit>
|
||||
+2
@@ -5,6 +5,8 @@
|
||||
// TODO: investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63859
|
||||
|
||||
// See https://youtrack.jetbrains.com/issue/KT-14938
|
||||
// WITH_REFLECT
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS FunInterfaceConstructorIsKFunctionKt.class
|
||||
PACKAGE METADATA
|
||||
PROPERTY getKr()Lkotlin/reflect/KFunction;
|
||||
Property: class.metadata.property.returnType
|
||||
K1
|
||||
kotlin/reflect/KFunction1<@kotlin/ParameterName(name = "function") kotlin/Function0<kotlin/Unit>, KRunnable>
|
||||
K2
|
||||
kotlin/reflect/KFunction1<kotlin/Function0<kotlin/Unit>, KRunnable>
|
||||
+2
@@ -6,6 +6,8 @@
|
||||
// IGNORE_BACKEND: JS
|
||||
// ^ Failed: kr is class Function1
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63861
|
||||
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.KFunction
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS FunInterfaceConstructorOfImplicitKFunctionTypeKt.class
|
||||
PACKAGE METADATA
|
||||
PROPERTY getKr()Lkotlin/reflect/KFunction;
|
||||
Property: class.metadata.property.returnType
|
||||
K1
|
||||
kotlin/reflect/KFunction1<@kotlin/ParameterName(name = "function") kotlin/Function0<kotlin/Unit>, KRunnable>
|
||||
K2
|
||||
kotlin/reflect/KFunction1<kotlin/Function0<kotlin/Unit>, KRunnable>
|
||||
+2
@@ -3,6 +3,8 @@
|
||||
// IGNORE_BACKEND: JVM
|
||||
// ^ unsupported in old JVM BE
|
||||
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63861
|
||||
|
||||
fun interface KRunnable {
|
||||
fun run()
|
||||
}
|
||||
|
||||
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
MODULE main
|
||||
CLASS GetArityViaFunctionImplKt$box$6.class
|
||||
Property: class.signature
|
||||
K1
|
||||
Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function1<Ljava/lang/String;Ljava/lang/Object;>;
|
||||
K2
|
||||
Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function1<Ljava/lang/String;Ljava/lang/String;>;
|
||||
K1
|
||||
invoke(Ljava/lang/String;)Ljava/lang/Object; [public, final]
|
||||
K2
|
||||
---
|
||||
K1
|
||||
---
|
||||
K2
|
||||
invoke(Ljava/lang/String;)Ljava/lang/String; [public, final]
|
||||
CLASS GetArityViaFunctionImplKt$box$9.class
|
||||
Property: class.signature
|
||||
K1
|
||||
Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function1<Ljava/lang/Integer;Ljava/lang/Object;>;
|
||||
K2
|
||||
Lkotlin/jvm/internal/Lambda;Lkotlin/jvm/functions/Function1<Ljava/lang/Integer;Ljava/lang/Integer;>;
|
||||
K1
|
||||
---
|
||||
K2
|
||||
invoke(I)Ljava/lang/Integer; [public, final]
|
||||
K1
|
||||
invoke(I)Ljava/lang/Object; [public, final]
|
||||
K2
|
||||
---
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_STDLIB
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62770
|
||||
// LAMBDAS: CLASS
|
||||
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
MODULE main
|
||||
CLASS Outer$Inner$p$1.class
|
||||
Property: class.signature
|
||||
K1
|
||||
Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function2<TPT;TPT;LOuter$Inner$p$PLocal<TPT;TIT;TOT;>;>;
|
||||
K2
|
||||
Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function2<TPT;TPT;LOuter$Inner$p$PLocal<TPT;TPT;TIT;TOT;>;>;
|
||||
METHOD invoke(Ljava/lang/Object;Ljava/lang/Object;)LOuter$Inner$p$PLocal;
|
||||
Property: method.signature
|
||||
K1
|
||||
(TPT;TPT;)LOuter$Inner$p$PLocal<TPT;TIT;TOT;>;
|
||||
K2
|
||||
(TPT;TPT;)LOuter$Inner$p$PLocal<TPT;TPT;TIT;TOT;>;
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62584
|
||||
|
||||
// KT-42025
|
||||
|
||||
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
MODULE main
|
||||
CLASS GenericLocalClassConstructorReferenceKt$p$1.class
|
||||
Property: class.signature
|
||||
K1
|
||||
Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function2<TPT;TPT;LGenericLocalClassConstructorReferenceKt$p$PLocal<TPT;>;>;
|
||||
K2
|
||||
Lkotlin/jvm/internal/FunctionReferenceImpl;Lkotlin/jvm/functions/Function2<TPT;TPT;LGenericLocalClassConstructorReferenceKt$p$PLocal<TPT;TPT;>;>;
|
||||
METHOD invoke(Ljava/lang/Object;Ljava/lang/Object;)LGenericLocalClassConstructorReferenceKt$p$PLocal;
|
||||
Property: method.signature
|
||||
K1
|
||||
(TPT;TPT;)LGenericLocalClassConstructorReferenceKt$p$PLocal<TPT;>;
|
||||
K2
|
||||
(TPT;TPT;)LGenericLocalClassConstructorReferenceKt$p$PLocal<TPT;TPT;>;
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62584
|
||||
|
||||
// KT-42025
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS a/A.class
|
||||
CLASS METADATA
|
||||
PROPERTY getValue()Ljava/lang/String;
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
Vendored
+3
@@ -1,7 +1,10 @@
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63984
|
||||
|
||||
// WITH_STDLIB
|
||||
// FILE: b.kt
|
||||
import a.A
|
||||
|
||||
|
||||
class B {
|
||||
fun getValue() = sequenceOf(A()).map(A::value).first()
|
||||
}
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
MODULE main
|
||||
CLASS A.class
|
||||
CLASS METADATA
|
||||
PROPERTY getValue()Ljava/lang/String;
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
CLASS C.class
|
||||
CLASS METADATA
|
||||
PROPERTY getValue()Ljava/lang/String;
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63984
|
||||
class A {
|
||||
var value: String = "fail1"
|
||||
private set
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS Bar.class
|
||||
CLASS METADATA
|
||||
PROPERTY getFoo()Ljava/lang/String;
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63984
|
||||
|
||||
import kotlin.reflect.KMutableProperty
|
||||
|
||||
class Bar(name: String) {
|
||||
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS Bar.class
|
||||
CLASS METADATA
|
||||
PROPERTY getFoo()Ljava/lang/String;
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/String
|
||||
K2
|
||||
value: kotlin/String
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// See KT-12337 Reference to property with invisible setter should not be a KMutableProperty
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63984
|
||||
|
||||
import kotlin.reflect.KProperty1
|
||||
import kotlin.reflect.KMutableProperty
|
||||
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
MODULE main
|
||||
Missing in K2
|
||||
TestKt$box$1.class
|
||||
TestKt$box$2.class
|
||||
CLASS TestKt.class
|
||||
Annotation: class.invisibleAnnotations
|
||||
K1
|
||||
---
|
||||
K2
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
test.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 test.kt
|
||||
TestKt
|
||||
+ 2 fake.kt
|
||||
kotlin/jvm/internal/FakeKt
|
||||
*L
|
||||
1#1,28:1
|
||||
1#2:29
|
||||
*E
|
||||
} )
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// !LANGUAGE: +ReferencesToSyntheticJavaProperties
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62849
|
||||
|
||||
// FILE: J.java
|
||||
|
||||
|
||||
Reference in New Issue
Block a user