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 ContextAndExtensionLambdaIndyKt.class
|
||||
PACKAGE METADATA
|
||||
FUNCTION accept(Lkotlin/jvm/functions/Function3;)I
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(block: @kotlin/ExtensionFunctionType @kotlin/ContextFunctionTypeParams(count = 1) kotlin/Function3<Ctx, Scope, kotlin/Int, kotlin/String>)
|
||||
K2
|
||||
(block: @kotlin/ContextFunctionTypeParams(count = 1) @kotlin/ExtensionFunctionType kotlin/Function3<Ctx, Scope, kotlin/Int, kotlin/String>)
|
||||
PROPERTY getFoo()Lkotlin/jvm/functions/Function3;
|
||||
Property: class.metadata.property.returnType
|
||||
K1
|
||||
@kotlin/ExtensionFunctionType @kotlin/ContextFunctionTypeParams(count = 1) kotlin/Function3<Ctx, Scope, @kotlin/ParameterName(name = "fooParam") kotlin/Int, kotlin/String>
|
||||
K2
|
||||
@kotlin/ContextFunctionTypeParams(count = 1) @kotlin/ExtensionFunctionType kotlin/Function3<Ctx, Scope, @kotlin/ParameterName(name = "fooParam") kotlin/Int, kotlin/String>
|
||||
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// JVM_TARGET: 1.8
|
||||
// LAMBDAS: INDY
|
||||
// JVM_ABI_K1_K2_DIFF: different order of function annotations
|
||||
|
||||
class Ctx {
|
||||
val k = "__K__"
|
||||
|
||||
Vendored
+61
@@ -0,0 +1,61 @@
|
||||
MODULE main
|
||||
CLASS ContextualInlineCallKt.class
|
||||
Annotation: class.invisibleAnnotations
|
||||
K1
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
contextualInlineCall.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 contextualInlineCall.kt
|
||||
ContextualInlineCallKt
|
||||
*L
|
||||
1#1,40:1
|
||||
11#1:41
|
||||
14#1:42
|
||||
17#1:43
|
||||
20#1:44
|
||||
26#1:45
|
||||
25#1,2:46
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 contextualInlineCall.kt
|
||||
ContextualInlineCallKt
|
||||
*L
|
||||
30#1:41
|
||||
31#1:42
|
||||
32#1:43
|
||||
33#1:44
|
||||
35#1:45
|
||||
36#1:46,2
|
||||
*E
|
||||
} )
|
||||
K2
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
contextualInlineCall.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 contextualInlineCall.kt
|
||||
ContextualInlineCallKt
|
||||
*L
|
||||
1#1,40:1
|
||||
11#1:41
|
||||
14#1:42
|
||||
17#1:43
|
||||
20#1:44
|
||||
26#1:45
|
||||
24#1,3:46
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 contextualInlineCall.kt
|
||||
ContextualInlineCallKt
|
||||
*L
|
||||
30#1:41
|
||||
31#1:42
|
||||
32#1:43
|
||||
33#1:44
|
||||
35#1:45
|
||||
36#1:46,3
|
||||
*E
|
||||
} )
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// KT-51271
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62464
|
||||
|
||||
class Context {
|
||||
fun c() = 1
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS FunctionalTypeKt.class
|
||||
PACKAGE METADATA
|
||||
FUNCTION f(LO;LK;Lkotlin/jvm/functions/Function3;)Ljava/lang/Object;
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(g: @kotlin/ExtensionFunctionType @kotlin/ContextFunctionTypeParams(count = 1) kotlin/Function3<O, K, Param, T#0>)
|
||||
K2
|
||||
(g: @kotlin/ContextFunctionTypeParams(count = 1) @kotlin/ExtensionFunctionType kotlin/Function3<O, K, Param, T#0>)
|
||||
Vendored
+1
@@ -1,5 +1,6 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// JVM_ABI_K1_K2_DIFF: different order of function annotations
|
||||
|
||||
class Param
|
||||
class O {
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
MODULE main
|
||||
CLASS Smth.class
|
||||
Annotation: class.invisibleAnnotations
|
||||
K1
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
kt51475.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 kt51475.kt
|
||||
Smth
|
||||
*L
|
||||
1#1,28:1
|
||||
18#1,4:29
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 kt51475.kt
|
||||
Smth
|
||||
*L
|
||||
13#1:29,4
|
||||
*E
|
||||
} )
|
||||
K2
|
||||
@Lkotlin/jvm/internal/SourceDebugExtension;( value: #{ SMAP
|
||||
kt51475.kt
|
||||
Kotlin
|
||||
*S Kotlin
|
||||
*F
|
||||
+ 1 kt51475.kt
|
||||
Smth
|
||||
*L
|
||||
1#1,28:1
|
||||
21#1:29
|
||||
*S KotlinDebug
|
||||
*F
|
||||
+ 1 kt51475.kt
|
||||
Smth
|
||||
*L
|
||||
13#1:29
|
||||
*E
|
||||
} )
|
||||
@@ -2,6 +2,7 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// !OPT_IN: kotlin.contracts.ExperimentalContracts
|
||||
// JVM_ABI_K1_K2_DIFF: KT-62464
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS Kt52213Kt.class
|
||||
PACKAGE METADATA
|
||||
FUNCTION execute(Lkotlin/jvm/functions/Function4;)V
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(block: @kotlin/ExtensionFunctionType @kotlin/ContextFunctionTypeParams(count = 1) suspend kotlin/Function4<Context, Receiver, Action, kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>)
|
||||
K2
|
||||
(block: @kotlin/ContextFunctionTypeParams(count = 1) @kotlin/ExtensionFunctionType suspend kotlin/Function4<Context, Receiver, Action, kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>)
|
||||
@@ -2,6 +2,7 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// WITH_COROUTINES
|
||||
// JVM_ABI_K1_K2_DIFF: different order of function annotations
|
||||
|
||||
interface Context
|
||||
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS Kt53551Kt.class
|
||||
PACKAGE METADATA
|
||||
FUNCTION withFooBar(Lkotlin/jvm/functions/Function4;)V
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(block: @kotlin/ExtensionFunctionType @kotlin/ContextFunctionTypeParams(count = 2) suspend kotlin/Function4<Foo, Bar, Baz, kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>)
|
||||
K2
|
||||
(block: @kotlin/ContextFunctionTypeParams(count = 2) @kotlin/ExtensionFunctionType suspend kotlin/Function4<Foo, Bar, Baz, kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>)
|
||||
@@ -2,6 +2,7 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// WITH_COROUTINES
|
||||
// JVM_ABI_K1_K2_DIFF: different order of function annotations
|
||||
|
||||
import helpers.*
|
||||
import kotlin.coroutines.*
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
MODULE main
|
||||
CLASS Kt58476Kt.class
|
||||
PACKAGE METADATA
|
||||
FUNCTION caller(Lkotlin/jvm/functions/Function3;)LMyOutput;
|
||||
Property: class.metadata.function.valueParameters
|
||||
K1
|
||||
(block: @kotlin/ExtensionFunctionType @kotlin/ContextFunctionTypeParams(count = 1) suspend kotlin/Function3<InContext, MyReciever, kotlin/coroutines/Continuation<kotlin/Int>, kotlin/Any?>)
|
||||
K2
|
||||
(block: @kotlin/ContextFunctionTypeParams(count = 1) @kotlin/ExtensionFunctionType suspend kotlin/Function3<InContext, MyReciever, kotlin/coroutines/Continuation<kotlin/Int>, kotlin/Any?>)
|
||||
@@ -2,6 +2,7 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// WITH_COROUTINES
|
||||
// JVM_ABI_K1_K2_DIFF: different order of function annotations
|
||||
|
||||
class InContext
|
||||
class MyReciever {
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
MODULE main
|
||||
CLASS EntityContext.class
|
||||
CLASS METADATA
|
||||
PROPERTY getD()[D
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/DoubleArray
|
||||
K2
|
||||
value: kotlin/DoubleArray
|
||||
PROPERTY getSize()I
|
||||
Property: class.metadata.property.setterValueParameter
|
||||
K1
|
||||
<set-?>: kotlin/Int
|
||||
K2
|
||||
value: kotlin/Int
|
||||
+2
@@ -1,6 +1,8 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_STDLIB
|
||||
// JVM_ABI_K1_K2_DIFF: KT-63984
|
||||
|
||||
|
||||
@file:Suppress("RESERVED_VAR_PROPERTY_OF_VALUE_CLASS")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user