[kotlinp] Split :tools:kotlinp into "common" and "jvm" subprojects
The "common" subproject keeps only backend-neutral logic and depends only on :kotlinx-metadata library. It takes the name of the former project - :tools:kotlinp The "jvm" subproject depends on the "common" one and also depends on :kotlinx-metadata-jvm. It gets the new name - :tools:kotlinp-jvm There is a lot of touched files in this commit. The majority of them is just moved files (tests, test data, etc). Only the following files were actually modified: .space/CODEOWNERS build.gradle.kts libraries/tools/abi-comparator/build.gradle.kts libraries/tools/kotlinp/build.gradle.kts libraries/tools/kotlinp/jvm/build.gradle.kts plugins/kapt3/kapt3-compiler/build.gradle.kts settings.gradle ^KT-62340
This commit is contained in:
committed by
Space Team
parent
eec76865a7
commit
d30efdb001
@@ -0,0 +1,186 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final annotation class A : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(ZCBSIFJDLkotlin/UInt;Lkotlin/UByte;Lkotlin/UShort;Lkotlin/ULong;Lkotlin/UInt;Lkotlin/UByte;Lkotlin/UShort;Lkotlin/ULong;[Z[C[B[S[I[F[J[DLjava/lang/String;Lkotlin/annotation/AnnotationTarget;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;LB;Lkotlin/Array;Lkotlin/Array;Lkotlin/Array;Lkotlin/Array;)V
|
||||
public constructor(z: kotlin/Boolean, c: kotlin/Char, b: kotlin/Byte, s: kotlin/Short, i: kotlin/Int, f: kotlin/Float, j: kotlin/Long, d: kotlin/Double, ui: kotlin/UInt, ub: kotlin/UByte, us: kotlin/UShort, ul: kotlin/ULong, ui_max: kotlin/UInt, ub_max: kotlin/UByte, us_max: kotlin/UShort, ul_max: kotlin/ULong, za: kotlin/BooleanArray, ca: kotlin/CharArray, ba: kotlin/ByteArray, sa: kotlin/ShortArray, ia: kotlin/IntArray, fa: kotlin/FloatArray, ja: kotlin/LongArray, da: kotlin/DoubleArray, str: kotlin/String, enum: kotlin/annotation/AnnotationTarget, klass: kotlin/reflect/KClass<*>, klass2: kotlin/reflect/KClass<*>, anno: B, stra: kotlin/Array<kotlin/String>, ka: kotlin/Array<kotlin/reflect/KClass<*>>, ea: kotlin/Array<kotlin/annotation/AnnotationTarget>, aa: kotlin/Array<B>)
|
||||
|
||||
// getter: aa()[LB;
|
||||
public final val aa: kotlin/Array<B>
|
||||
public final get
|
||||
|
||||
// getter: anno()LB;
|
||||
public final val anno: B
|
||||
public final get
|
||||
|
||||
// getter: b()B
|
||||
public final val b: kotlin/Byte
|
||||
public final get
|
||||
|
||||
// getter: ba()[B
|
||||
public final val ba: kotlin/ByteArray
|
||||
public final get
|
||||
|
||||
// getter: c()C
|
||||
public final val c: kotlin/Char
|
||||
public final get
|
||||
|
||||
// getter: ca()[C
|
||||
public final val ca: kotlin/CharArray
|
||||
public final get
|
||||
|
||||
// getter: d()D
|
||||
public final val d: kotlin/Double
|
||||
public final get
|
||||
|
||||
// getter: da()[D
|
||||
public final val da: kotlin/DoubleArray
|
||||
public final get
|
||||
|
||||
// getter: ea()[Lkotlin/annotation/AnnotationTarget;
|
||||
public final val ea: kotlin/Array<kotlin/annotation/AnnotationTarget>
|
||||
public final get
|
||||
|
||||
// getter: enum()Lkotlin/annotation/AnnotationTarget;
|
||||
public final val enum: kotlin/annotation/AnnotationTarget
|
||||
public final get
|
||||
|
||||
// getter: f()F
|
||||
public final val f: kotlin/Float
|
||||
public final get
|
||||
|
||||
// getter: fa()[F
|
||||
public final val fa: kotlin/FloatArray
|
||||
public final get
|
||||
|
||||
// getter: i()I
|
||||
public final val i: kotlin/Int
|
||||
public final get
|
||||
|
||||
// getter: ia()[I
|
||||
public final val ia: kotlin/IntArray
|
||||
public final get
|
||||
|
||||
// getter: j()J
|
||||
public final val j: kotlin/Long
|
||||
public final get
|
||||
|
||||
// getter: ja()[J
|
||||
public final val ja: kotlin/LongArray
|
||||
public final get
|
||||
|
||||
// getter: ka()[Ljava/lang/Class;
|
||||
public final val ka: kotlin/Array<kotlin/reflect/KClass<*>>
|
||||
public final get
|
||||
|
||||
// getter: klass()Ljava/lang/Class;
|
||||
public final val klass: kotlin/reflect/KClass<*>
|
||||
public final get
|
||||
|
||||
// getter: klass2()Ljava/lang/Class;
|
||||
public final val klass2: kotlin/reflect/KClass<*>
|
||||
public final get
|
||||
|
||||
// getter: s()S
|
||||
public final val s: kotlin/Short
|
||||
public final get
|
||||
|
||||
// getter: sa()[S
|
||||
public final val sa: kotlin/ShortArray
|
||||
public final get
|
||||
|
||||
// getter: str()Ljava/lang/String;
|
||||
public final val str: kotlin/String
|
||||
public final get
|
||||
|
||||
// getter: stra()[Ljava/lang/String;
|
||||
public final val stra: kotlin/Array<kotlin/String>
|
||||
public final get
|
||||
|
||||
// getter: ub()B
|
||||
public final val ub: kotlin/UByte
|
||||
public final get
|
||||
|
||||
// getter: ub_max()B
|
||||
public final val ub_max: kotlin/UByte
|
||||
public final get
|
||||
|
||||
// getter: ui()I
|
||||
public final val ui: kotlin/UInt
|
||||
public final get
|
||||
|
||||
// getter: ui_max()I
|
||||
public final val ui_max: kotlin/UInt
|
||||
public final get
|
||||
|
||||
// getter: ul()J
|
||||
public final val ul: kotlin/ULong
|
||||
public final get
|
||||
|
||||
// getter: ul_max()J
|
||||
public final val ul_max: kotlin/ULong
|
||||
public final get
|
||||
|
||||
// getter: us()S
|
||||
public final val us: kotlin/UShort
|
||||
public final get
|
||||
|
||||
// getter: us_max()S
|
||||
public final val us_max: kotlin/UShort
|
||||
public final get
|
||||
|
||||
// getter: z()Z
|
||||
public final val z: kotlin/Boolean
|
||||
public final get
|
||||
|
||||
// getter: za()[Z
|
||||
public final val za: kotlin/BooleanArray
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
public final annotation class B : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;)V
|
||||
public constructor(value: kotlin/String)
|
||||
|
||||
// getter: value()Ljava/lang/String;
|
||||
public final val value: kotlin/String
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// C.class
|
||||
// ------------------------------------------
|
||||
public final class C : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: parameterTypeAnnotation(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public final fun parameterTypeAnnotation(p: @JvmNamed(value = "Q_Q") kotlin/Any): kotlin/Any
|
||||
|
||||
// signature: returnTypeAnnotation()V
|
||||
public final fun returnTypeAnnotation(): @A(z = true, c = 'x', b = 1.toByte(), s = 42.toShort(), i = 42424242, f = -2.72f, j = 239239239239239L, d = 3.14, ui = 1u, ub = 255.toUByte(), us = 3.toUShort(), ul = 4uL, ui_max = 4294967295u, ub_max = 255.toUByte(), us_max = 65535.toUShort(), ul_max = 18446744073709551615uL, za = [true], ca = ['\''], ba = [1.toByte()], sa = [42.toShort()], ia = [42424242], fa = [-2.72f], ja = [239239239239239L], da = [3.14], str = "aba\ncaba'\"\t\u0001\u0002ꙮ", enum = kotlin/annotation/AnnotationTarget.CLASS, klass = C::class, klass2 = kotlin/IntArray::class, anno = B(value = "aba\ncaba'\"\t\u0001\u0002ꙮ"), stra = ["lmao"], ka = [kotlin/Double::class, kotlin/Unit::class, kotlin/LongArray::class, kotlin/Array<kotlin/String::class>], ea = [kotlin/annotation/AnnotationTarget.TYPEALIAS, kotlin/annotation/AnnotationTarget.FIELD], aa = [B(value = "2"), B(value = "3")]) kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// JvmNamed.class
|
||||
// ------------------------------------------
|
||||
public final annotation class JvmNamed : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;)V
|
||||
public constructor(value: kotlin/String)
|
||||
|
||||
// getter: uglyJvmName()Ljava/lang/String;
|
||||
public final val value: kotlin/String
|
||||
public final /* non-default */ get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
// IGNORE K2
|
||||
// ^ KT-63631 K2: constant value of UByte.MAX_VALUE is incorrectly serialized to metadata
|
||||
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class A(
|
||||
val z: Boolean,
|
||||
val c: Char,
|
||||
val b: Byte,
|
||||
val s: Short,
|
||||
val i: Int,
|
||||
val f: Float,
|
||||
val j: Long,
|
||||
val d: Double,
|
||||
val ui: UInt,
|
||||
val ub: UByte,
|
||||
val us: UShort,
|
||||
val ul: ULong,
|
||||
val ui_max: UInt,
|
||||
val ub_max: UByte,
|
||||
val us_max: UShort,
|
||||
val ul_max: ULong,
|
||||
val za: BooleanArray,
|
||||
val ca: CharArray,
|
||||
val ba: ByteArray,
|
||||
val sa: ShortArray,
|
||||
val ia: IntArray,
|
||||
val fa: FloatArray,
|
||||
val ja: LongArray,
|
||||
val da: DoubleArray,
|
||||
val str: String,
|
||||
val enum: AnnotationTarget,
|
||||
val klass: KClass<*>,
|
||||
val klass2: KClass<*>,
|
||||
val anno: B,
|
||||
val stra: Array<String>,
|
||||
val ka: Array<KClass<*>>,
|
||||
val ea: Array<AnnotationTarget>,
|
||||
val aa: Array<B>
|
||||
)
|
||||
|
||||
annotation class B(val value: String)
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class JvmNamed(@get:JvmName("uglyJvmName") val value: String)
|
||||
|
||||
class C {
|
||||
fun returnTypeAnnotation(): @A(
|
||||
true,
|
||||
'x',
|
||||
1.toByte(),
|
||||
42.toShort(),
|
||||
42424242,
|
||||
-2.72f,
|
||||
239239239239239L,
|
||||
3.14,
|
||||
1u,
|
||||
0xFFu,
|
||||
3u,
|
||||
4uL,
|
||||
0xFFFF_FFFFu,
|
||||
UByte.MAX_VALUE,
|
||||
0xFF_FFu,
|
||||
18446744073709551615u,
|
||||
[true],
|
||||
['\''],
|
||||
[1.toByte()],
|
||||
[42.toShort()],
|
||||
[42424242],
|
||||
[-2.72f],
|
||||
[239239239239239L],
|
||||
[3.14],
|
||||
"aba\ncaba'\"\t\u0001\u0002\uA66E",
|
||||
AnnotationTarget.CLASS,
|
||||
C::class,
|
||||
IntArray::class,
|
||||
B(value = "aba\ncaba'\"\t\u0001\u0002\uA66E"),
|
||||
["lmao"],
|
||||
[Double::class, Unit::class, LongArray::class, Array<String>::class],
|
||||
[AnnotationTarget.TYPEALIAS, AnnotationTarget.FIELD],
|
||||
[B("2"), B(value = "3")]
|
||||
) Unit {}
|
||||
|
||||
fun parameterTypeAnnotation(p: @JvmNamed("Q_Q") Any): Any = p
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final annotation class A : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(ZCBSIFJDLkotlin/UInt;Lkotlin/UByte;Lkotlin/UShort;Lkotlin/ULong;Lkotlin/UInt;Lkotlin/UByte;Lkotlin/UShort;Lkotlin/ULong;[Z[C[B[S[I[F[J[DLjava/lang/String;Lkotlin/annotation/AnnotationTarget;Lkotlin/reflect/KClass;Lkotlin/reflect/KClass;LB;Lkotlin/Array;Lkotlin/Array;Lkotlin/Array;Lkotlin/Array;)V
|
||||
public constructor(z: kotlin/Boolean, c: kotlin/Char, b: kotlin/Byte, s: kotlin/Short, i: kotlin/Int, f: kotlin/Float, j: kotlin/Long, d: kotlin/Double, ui: kotlin/UInt, ub: kotlin/UByte, us: kotlin/UShort, ul: kotlin/ULong, ui_max: kotlin/UInt, ub_max: kotlin/UByte, us_max: kotlin/UShort, ul_max: kotlin/ULong, za: kotlin/BooleanArray, ca: kotlin/CharArray, ba: kotlin/ByteArray, sa: kotlin/ShortArray, ia: kotlin/IntArray, fa: kotlin/FloatArray, ja: kotlin/LongArray, da: kotlin/DoubleArray, str: kotlin/String, enum: kotlin/annotation/AnnotationTarget, klass: kotlin/reflect/KClass<*>, klass2: kotlin/reflect/KClass<*>, anno: B, stra: kotlin/Array<kotlin/String>, ka: kotlin/Array<kotlin/reflect/KClass<*>>, ea: kotlin/Array<kotlin/annotation/AnnotationTarget>, aa: kotlin/Array<B>)
|
||||
|
||||
// getter: aa()[LB;
|
||||
public final val aa: kotlin/Array<B>
|
||||
public final get
|
||||
|
||||
// getter: anno()LB;
|
||||
public final val anno: B
|
||||
public final get
|
||||
|
||||
// getter: b()B
|
||||
public final val b: kotlin/Byte
|
||||
public final get
|
||||
|
||||
// getter: ba()[B
|
||||
public final val ba: kotlin/ByteArray
|
||||
public final get
|
||||
|
||||
// getter: c()C
|
||||
public final val c: kotlin/Char
|
||||
public final get
|
||||
|
||||
// getter: ca()[C
|
||||
public final val ca: kotlin/CharArray
|
||||
public final get
|
||||
|
||||
// getter: d()D
|
||||
public final val d: kotlin/Double
|
||||
public final get
|
||||
|
||||
// getter: da()[D
|
||||
public final val da: kotlin/DoubleArray
|
||||
public final get
|
||||
|
||||
// getter: ea()[Lkotlin/annotation/AnnotationTarget;
|
||||
public final val ea: kotlin/Array<kotlin/annotation/AnnotationTarget>
|
||||
public final get
|
||||
|
||||
// getter: enum()Lkotlin/annotation/AnnotationTarget;
|
||||
public final val enum: kotlin/annotation/AnnotationTarget
|
||||
public final get
|
||||
|
||||
// getter: f()F
|
||||
public final val f: kotlin/Float
|
||||
public final get
|
||||
|
||||
// getter: fa()[F
|
||||
public final val fa: kotlin/FloatArray
|
||||
public final get
|
||||
|
||||
// getter: i()I
|
||||
public final val i: kotlin/Int
|
||||
public final get
|
||||
|
||||
// getter: ia()[I
|
||||
public final val ia: kotlin/IntArray
|
||||
public final get
|
||||
|
||||
// getter: j()J
|
||||
public final val j: kotlin/Long
|
||||
public final get
|
||||
|
||||
// getter: ja()[J
|
||||
public final val ja: kotlin/LongArray
|
||||
public final get
|
||||
|
||||
// getter: ka()[Ljava/lang/Class;
|
||||
public final val ka: kotlin/Array<kotlin/reflect/KClass<*>>
|
||||
public final get
|
||||
|
||||
// getter: klass()Ljava/lang/Class;
|
||||
public final val klass: kotlin/reflect/KClass<*>
|
||||
public final get
|
||||
|
||||
// getter: klass2()Ljava/lang/Class;
|
||||
public final val klass2: kotlin/reflect/KClass<*>
|
||||
public final get
|
||||
|
||||
// getter: s()S
|
||||
public final val s: kotlin/Short
|
||||
public final get
|
||||
|
||||
// getter: sa()[S
|
||||
public final val sa: kotlin/ShortArray
|
||||
public final get
|
||||
|
||||
// getter: str()Ljava/lang/String;
|
||||
public final val str: kotlin/String
|
||||
public final get
|
||||
|
||||
// getter: stra()[Ljava/lang/String;
|
||||
public final val stra: kotlin/Array<kotlin/String>
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: ub()B
|
||||
public final val ub: kotlin/UByte
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: ub_max()B
|
||||
public final val ub_max: kotlin/UByte
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: ui()I
|
||||
public final val ui: kotlin/UInt
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: ui_max()I
|
||||
public final val ui_max: kotlin/UInt
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: ul()J
|
||||
public final val ul: kotlin/ULong
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: ul_max()J
|
||||
public final val ul_max: kotlin/ULong
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: us()S
|
||||
public final val us: kotlin/UShort
|
||||
public final get
|
||||
|
||||
// requires compiler version 1.4.30 (level=ERROR)
|
||||
// requires language version 1.4.0 (level=ERROR)
|
||||
// getter: us_max()S
|
||||
public final val us_max: kotlin/UShort
|
||||
public final get
|
||||
|
||||
// getter: z()Z
|
||||
public final val z: kotlin/Boolean
|
||||
public final get
|
||||
|
||||
// getter: za()[Z
|
||||
public final val za: kotlin/BooleanArray
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
public final annotation class B : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;)V
|
||||
public constructor(value: kotlin/String)
|
||||
|
||||
// getter: value()Ljava/lang/String;
|
||||
public final val value: kotlin/String
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// C.class
|
||||
// ------------------------------------------
|
||||
public final class C : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: parameterTypeAnnotation(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
public final fun parameterTypeAnnotation(p: @JvmNamed(value = "Q_Q") kotlin/Any): kotlin/Any
|
||||
|
||||
// signature: returnTypeAnnotation()V
|
||||
public final fun returnTypeAnnotation(): @A(z = true, c = 'x', b = 1.toByte(), s = 42.toShort(), i = 42424242, f = -2.72f, j = 239239239239239L, d = 3.14, ui = 1u, ub = 255.toUByte(), us = 3.toUShort(), ul = 4uL, ui_max = 4294967295u, ub_max = 255.toUByte(), us_max = 65535.toUShort(), ul_max = 18446744073709551615uL, za = [true], ca = ['\''], ba = [1.toByte()], sa = [42.toShort()], ia = [42424242], fa = [-2.72f], ja = [239239239239239L], da = [3.14], str = "aba\ncaba'\"\t\u0001\u0002ꙮ", enum = kotlin/annotation/AnnotationTarget.CLASS, klass = C::class, klass2 = kotlin/IntArray::class, anno = B(value = "aba\ncaba'\"\t\u0001\u0002ꙮ"), stra = ["lmao"], ka = [kotlin/Double::class, kotlin/Unit::class, kotlin/LongArray::class, kotlin/Array<kotlin/String::class>], ea = [kotlin/annotation/AnnotationTarget.TYPEALIAS, kotlin/annotation/AnnotationTarget.FIELD], aa = [B(value = "2"), B(value = "3")]) kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// JvmNamed.class
|
||||
// ------------------------------------------
|
||||
public final annotation class JvmNamed : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;)V
|
||||
public constructor(value: kotlin/String)
|
||||
|
||||
// getter: uglyJvmName()Ljava/lang/String;
|
||||
public final val value: kotlin/String
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
class A {
|
||||
val constantString: String = "OK"
|
||||
val constantInt: Int = 12
|
||||
val constantDouble: Double = 1.0
|
||||
val constantNull: String? = null
|
||||
}
|
||||
|
||||
const val four = 2 + 2
|
||||
@@ -0,0 +1,46 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final class A : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// field: constantDouble:D
|
||||
// getter: getConstantDouble()D
|
||||
public final val constantDouble: kotlin/Double /* = ... */
|
||||
public final get
|
||||
|
||||
// field: constantInt:I
|
||||
// getter: getConstantInt()I
|
||||
public final val constantInt: kotlin/Int /* = ... */
|
||||
public final get
|
||||
|
||||
// field: constantNull:Ljava/lang/String;
|
||||
// getter: getConstantNull()Ljava/lang/String;
|
||||
public final val constantNull: kotlin/String?
|
||||
public final get
|
||||
|
||||
// field: constantString:Ljava/lang/String;
|
||||
// getter: getConstantString()Ljava/lang/String;
|
||||
public final val constantString: kotlin/String /* = ... */
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// ConstantsKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// field: four:I
|
||||
public final const val four: kotlin/Int /* = ... */
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
ConstantsKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// !LANGUAGE: +ContextReceivers
|
||||
|
||||
interface A
|
||||
interface B
|
||||
|
||||
context(A) class C {
|
||||
context(B) fun f() {}
|
||||
}
|
||||
|
||||
context(A) fun g() {}
|
||||
context(B) val h: Int get() = 42
|
||||
@@ -0,0 +1,48 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public abstract interface A : kotlin/Any {
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
public abstract interface B : kotlin/Any {
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// C.class
|
||||
// ------------------------------------------
|
||||
context(A)
|
||||
public final class C : kotlin/Any {
|
||||
|
||||
// signature: <init>(LA;)V
|
||||
public constructor()
|
||||
|
||||
// signature: f(LB;)V
|
||||
context(B)
|
||||
public final fun f(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// ContextReceiversKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: g(LA;)V
|
||||
context(A)
|
||||
public final fun g(): kotlin/Unit
|
||||
|
||||
// getter: getH(LB;)I
|
||||
context(B)
|
||||
public final val h: kotlin/Int
|
||||
public final /* non-default */ get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
ContextReceiversKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
@file:OptIn(ExperimentalContracts::class)
|
||||
|
||||
import kotlin.contracts.InvocationKind
|
||||
import kotlin.contracts.contract
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
|
||||
fun returnsTrue(condition: Boolean) {
|
||||
contract {
|
||||
returns(true) implies (condition)
|
||||
}
|
||||
}
|
||||
|
||||
fun returnsNull(condition: Boolean) {
|
||||
contract {
|
||||
returns(null) implies (condition)
|
||||
}
|
||||
}
|
||||
|
||||
fun returnsNotNull(condition: Boolean) {
|
||||
contract {
|
||||
returnsNotNull() implies (condition)
|
||||
}
|
||||
}
|
||||
|
||||
fun Any?.receiverIsNotNull(): Boolean {
|
||||
contract {
|
||||
returns(true) implies (this@receiverIsNotNull != null)
|
||||
}
|
||||
return this != null
|
||||
}
|
||||
|
||||
inline fun callsInPlaceAtMostOnce(block: () -> Unit) {
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.AT_MOST_ONCE)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun callsInPlaceUnknown(block: () -> Unit) {
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.UNKNOWN)
|
||||
}
|
||||
}
|
||||
|
||||
fun conjunction(a: Boolean, b: Boolean, c: Boolean) {
|
||||
contract {
|
||||
returns() implies (a && !b && c)
|
||||
}
|
||||
}
|
||||
|
||||
fun disjunction(a: Boolean, b: Boolean, c: Boolean) {
|
||||
contract {
|
||||
returns() implies (a || !b || c)
|
||||
}
|
||||
}
|
||||
|
||||
fun complexBoolean(a: Any?, b: Any?, c: Any?, d: Any?) {
|
||||
contract {
|
||||
returns() implies ((a != null && c != null) || (b == null && d != null))
|
||||
}
|
||||
}
|
||||
|
||||
fun negatedIsAndConjunction(a: Any?, b: Boolean, c: Any?) {
|
||||
contract {
|
||||
returns() implies (a !is List<*> && b && c == null)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
// ContractsKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// requires compiler version 1.3.50 (level=ERROR)
|
||||
// signature: callsInPlaceAtMostOnce(Lkotlin/jvm/functions/Function0;)V
|
||||
public final inline fun callsInPlaceAtMostOnce(block: kotlin/Function0<kotlin/Unit>): kotlin/Unit
|
||||
contract {
|
||||
callsInPlace(p#1, InvocationKind.AT_MOST_ONCE)
|
||||
}
|
||||
|
||||
// requires compiler version 1.3.50 (level=ERROR)
|
||||
// signature: callsInPlaceUnknown(Lkotlin/jvm/functions/Function0;)V
|
||||
public final inline fun callsInPlaceUnknown(block: kotlin/Function0<kotlin/Unit>): kotlin/Unit
|
||||
contract {
|
||||
callsInPlace(p#1)
|
||||
}
|
||||
|
||||
// signature: complexBoolean(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
|
||||
public final fun complexBoolean(a: kotlin/Any?, b: kotlin/Any?, c: kotlin/Any?, d: kotlin/Any?): kotlin/Unit
|
||||
contract {
|
||||
returns() implies ((p#1 != null && p#3 != null) || (p#2 == null && p#4 != null))
|
||||
}
|
||||
|
||||
// signature: conjunction(ZZZ)V
|
||||
public final fun conjunction(a: kotlin/Boolean, b: kotlin/Boolean, c: kotlin/Boolean): kotlin/Unit
|
||||
contract {
|
||||
returns() implies (p#1 && p#2 && p#3)
|
||||
}
|
||||
|
||||
// signature: disjunction(ZZZ)V
|
||||
public final fun disjunction(a: kotlin/Boolean, b: kotlin/Boolean, c: kotlin/Boolean): kotlin/Unit
|
||||
contract {
|
||||
returns() implies (p#1 || p#2 || p#3)
|
||||
}
|
||||
|
||||
// signature: negatedIsAndConjunction(Ljava/lang/Object;ZLjava/lang/Object;)V
|
||||
public final fun negatedIsAndConjunction(a: kotlin/Any?, b: kotlin/Boolean, c: kotlin/Any?): kotlin/Unit
|
||||
contract {
|
||||
returns() implies (p#1 !is kotlin/collections/List<*> && p#2 && p#3 == null)
|
||||
}
|
||||
|
||||
// signature: receiverIsNotNull(Ljava/lang/Object;)Z
|
||||
public final fun kotlin/Any?.receiverIsNotNull(): kotlin/Boolean
|
||||
contract {
|
||||
returns(true) implies (p#0 != null)
|
||||
}
|
||||
|
||||
// signature: returnsNotNull(Z)V
|
||||
public final fun returnsNotNull(condition: kotlin/Boolean): kotlin/Unit
|
||||
contract {
|
||||
returnsNotNull() implies (p#1)
|
||||
}
|
||||
|
||||
// signature: returnsNull(Z)V
|
||||
public final fun returnsNull(condition: kotlin/Boolean): kotlin/Unit
|
||||
contract {
|
||||
returns(null) implies (p#1)
|
||||
}
|
||||
|
||||
// signature: returnsTrue(Z)V
|
||||
public final fun returnsTrue(condition: kotlin/Boolean): kotlin/Unit
|
||||
contract {
|
||||
returns(true) implies (p#1)
|
||||
}
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
ContractsKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
interface I {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
class A(i: I): I by i {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final class A : I {
|
||||
|
||||
// signature: <init>(LI;)V
|
||||
public constructor(i: I)
|
||||
|
||||
// signature: foo()V
|
||||
public open /* delegation */ fun foo(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// I.class
|
||||
// ------------------------------------------
|
||||
public abstract interface I : kotlin/Any {
|
||||
|
||||
// signature: foo()V
|
||||
public abstract fun foo(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
|
||||
enum class MyEnum {
|
||||
ONE, TWO
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// MyEnum.class
|
||||
// ------------------------------------------
|
||||
public final enum class MyEnum : kotlin/Enum<MyEnum> {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;I)V
|
||||
private constructor()
|
||||
|
||||
ONE,
|
||||
|
||||
TWO,
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has Enum.entries
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun interface F {
|
||||
fun String.f(x: Int)
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// F.class
|
||||
// ------------------------------------------
|
||||
public abstract fun interface F : kotlin/Any {
|
||||
|
||||
// signature: f(Ljava/lang/String;I)V
|
||||
public abstract fun kotlin/String.f(x: kotlin/Int): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
interface A
|
||||
interface B
|
||||
class Inv<T>(e: T)
|
||||
|
||||
fun <S> intersection(x: Inv<in S>, y: Inv<in S>): S = TODO()
|
||||
|
||||
fun <K> use(k: K, f: K.(K) -> K) {}
|
||||
fun <K> useNested(k: K, f: Inv<K>.(Inv<K>) -> Inv<K>) {}
|
||||
|
||||
fun <T> createDelegate(f: () -> T): Delegate<T> = Delegate()
|
||||
|
||||
class Delegate<T> {
|
||||
operator fun getValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>): T = TODO()
|
||||
operator fun setValue(thisRef: Any?, property: kotlin.reflect.KProperty<*>, value: T) {}
|
||||
}
|
||||
|
||||
fun test(a: Inv<A>, b: Inv<B>) {
|
||||
val intersectionType = intersection(a, b)
|
||||
|
||||
use(intersectionType) { intersectionType }
|
||||
useNested(intersectionType) { Inv(intersectionType) }
|
||||
|
||||
var d by createDelegate { intersectionType }
|
||||
}
|
||||
Vendored
+75
@@ -0,0 +1,75 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public abstract interface A : kotlin/Any {
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
public abstract interface B : kotlin/Any {
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// Delegate.class
|
||||
// ------------------------------------------
|
||||
public final class Delegate<T#0 /* T */> : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
||||
public final operator fun getValue(thisRef: kotlin/Any?, property: kotlin/reflect/KProperty<*>): T#0
|
||||
|
||||
// signature: setValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;Ljava/lang/Object;)V
|
||||
public final operator fun setValue(thisRef: kotlin/Any?, property: kotlin/reflect/KProperty<*>, value: T#0): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// IntersectionTypeInLambdaLiteralAndDelegatedPropertyKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: createDelegate(Lkotlin/jvm/functions/Function0;)LDelegate;
|
||||
public final fun <T#0 /* T */> createDelegate(f: kotlin/Function0<T#0>): Delegate<T#0>
|
||||
|
||||
// signature: intersection(LInv;LInv;)Ljava/lang/Object;
|
||||
public final fun <T#0 /* S */> intersection(x: Inv<in T#0>, y: Inv<in T#0>): T#0
|
||||
|
||||
// signature: test(LInv;LInv;)V
|
||||
public final fun test(a: Inv<A>, b: Inv<B>): kotlin/Unit
|
||||
|
||||
// signature: use(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)V
|
||||
public final fun <T#0 /* K */> use(k: T#0, f: @kotlin/ExtensionFunctionType kotlin/Function2<T#0, T#0, T#0>): kotlin/Unit
|
||||
|
||||
// signature: useNested(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)V
|
||||
public final fun <T#0 /* K */> useNested(k: T#0, f: @kotlin/ExtensionFunctionType kotlin/Function2<Inv<T#0>, Inv<T#0>, Inv<T#0>>): kotlin/Unit
|
||||
|
||||
// local delegated property #0
|
||||
// local final /* delegated */ var d: kotlin/Any
|
||||
// local final get
|
||||
// local final set
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// IntersectionTypeInLambdaLiteralAndDelegatedPropertyKt$test$1.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// IntersectionTypeInLambdaLiteralAndDelegatedPropertyKt$test$2.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// Inv.class
|
||||
// ------------------------------------------
|
||||
public final class Inv<T#0 /* T */> : kotlin/Any {
|
||||
|
||||
// signature: <init>(Ljava/lang/Object;)V
|
||||
public constructor(e: T#0)
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
IntersectionTypeInLambdaLiteralAndDelegatedPropertyKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun test() {
|
||||
val f = {}
|
||||
val g = fun Unit.(s: IntArray?, t: Set<Double>): String { return "" }
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// LambdaKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: test()V
|
||||
public final fun test(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
LambdaKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate<T>(val value: T? = null) {
|
||||
operator fun getValue(instance: Any?, property: KProperty<*>): T = value!!
|
||||
}
|
||||
|
||||
val nonLocal by Delegate<String>()
|
||||
|
||||
val init0 = run {
|
||||
val local1 by Delegate<Double>()
|
||||
val local2 by Delegate<Any>()
|
||||
}
|
||||
|
||||
val init1 = run {
|
||||
val local3 by Delegate<CharSequence?>()
|
||||
}
|
||||
|
||||
class Class {
|
||||
init {
|
||||
val local4 by Delegate<Array<String>>()
|
||||
}
|
||||
|
||||
fun f() {
|
||||
val local5 by Delegate<List<Unit>?>()
|
||||
|
||||
fun g() {
|
||||
val local6 by Delegate<Int>()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// Class.class
|
||||
// ------------------------------------------
|
||||
public final class Class : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: f()V
|
||||
public final fun f(): kotlin/Unit
|
||||
|
||||
// local delegated property #0
|
||||
// local final /* delegated */ val local4: kotlin/Array<kotlin/String>
|
||||
// local final get
|
||||
|
||||
// local delegated property #1
|
||||
// local final /* delegated */ val local5: kotlin/collections/List<kotlin/Unit>?
|
||||
// local final get
|
||||
|
||||
// local delegated property #2
|
||||
// local final /* delegated */ val local6: kotlin/Int
|
||||
// local final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// Delegate.class
|
||||
// ------------------------------------------
|
||||
public final class Delegate<T#0 /* T */> : kotlin/Any {
|
||||
|
||||
// signature: <init>(Ljava/lang/Object;)V
|
||||
public constructor(value: T#0? /* = ... */)
|
||||
|
||||
// signature: getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
||||
public final operator fun getValue(instance: kotlin/Any?, property: kotlin/reflect/KProperty<*>): T#0
|
||||
|
||||
// field: value:Ljava/lang/Object;
|
||||
// getter: getValue()Ljava/lang/Object;
|
||||
public final val value: T#0?
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// LocalDelegatedPropertiesKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// field: init0:Lkotlin/Unit;
|
||||
// getter: getInit0()Lkotlin/Unit;
|
||||
public final val init0: kotlin/Unit
|
||||
public final get
|
||||
|
||||
// field: init1:Lkotlin/Unit;
|
||||
// getter: getInit1()Lkotlin/Unit;
|
||||
public final val init1: kotlin/Unit
|
||||
public final get
|
||||
|
||||
// field: nonLocal$delegate:LDelegate;
|
||||
// getter: getNonLocal()Ljava/lang/String;
|
||||
public final /* delegated */ val nonLocal: kotlin/String
|
||||
public final /* non-default */ get
|
||||
|
||||
// local delegated property #0
|
||||
// local final /* delegated */ val local1: kotlin/Double
|
||||
// local final get
|
||||
|
||||
// local delegated property #1
|
||||
// local final /* delegated */ val local2: kotlin/Any
|
||||
// local final get
|
||||
|
||||
// local delegated property #2
|
||||
// local final /* delegated */ val local3: kotlin/CharSequence?
|
||||
// local final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
LocalDelegatedPropertiesKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
@file:JvmMultifileClass
|
||||
@file:JvmName("File")
|
||||
package test
|
||||
|
||||
const val x = 42
|
||||
@@ -0,0 +1,23 @@
|
||||
// test/File.class
|
||||
// ------------------------------------------
|
||||
multi-file class {
|
||||
// test/File__MultiFileClassKt
|
||||
}
|
||||
// test/File__MultiFileClassKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
// facade: test/File
|
||||
|
||||
// field: x:I
|
||||
public final const val x: kotlin/Int /* = ... */
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package test {
|
||||
test/File__MultiFileClassKt (test/File)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
interface A {
|
||||
interface B {
|
||||
interface C
|
||||
}
|
||||
|
||||
companion object D {
|
||||
enum class E {
|
||||
E1,
|
||||
E2,
|
||||
}
|
||||
|
||||
sealed class F {
|
||||
class G : F()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public abstract interface A : kotlin/Any {
|
||||
|
||||
// companion object: D
|
||||
|
||||
// nested class: B
|
||||
|
||||
// nested class: D
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$B.class
|
||||
// ------------------------------------------
|
||||
public abstract interface A.B : kotlin/Any {
|
||||
|
||||
// nested class: C
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$B$C.class
|
||||
// ------------------------------------------
|
||||
public abstract interface A.B.C : kotlin/Any {
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$D.class
|
||||
// ------------------------------------------
|
||||
public final companion object A.D : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
private constructor()
|
||||
|
||||
// nested class: E
|
||||
|
||||
// nested class: F
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$D$E.class
|
||||
// ------------------------------------------
|
||||
public final enum class A.D.E : kotlin/Enum<A.D.E> {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;I)V
|
||||
private constructor()
|
||||
|
||||
E1,
|
||||
|
||||
E2,
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has Enum.entries
|
||||
}
|
||||
// A$D$F.class
|
||||
// ------------------------------------------
|
||||
public sealed class A.D.F : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
protected constructor()
|
||||
|
||||
// nested class: G
|
||||
|
||||
// sealed subclass: A.D.F.G
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$D$F$G.class
|
||||
// ------------------------------------------
|
||||
public final class A.D.F.G : A.D.F {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
|
||||
class UsualClass {
|
||||
fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// UsualClass.class
|
||||
// ------------------------------------------
|
||||
public final class UsualClass : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: foo()V
|
||||
public final fun foo(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// IGNORE K2
|
||||
// ^ KT-62931 K2: extra class files for @OptionalExpectation marked annotations
|
||||
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// !OPT_IN: kotlin.ExperimentalMultiplatform
|
||||
// NO_READ_WRITE_COMPARE
|
||||
|
||||
package test
|
||||
|
||||
@OptionalExpectation
|
||||
expect annotation class A(val x: Int)
|
||||
|
||||
@OptionalExpectation
|
||||
expect annotation class B(val a: Array<String>)
|
||||
|
||||
@OptionalExpectation
|
||||
expect annotation class C()
|
||||
|
||||
@OptionalExpectation
|
||||
expect annotation class D()
|
||||
|
||||
actual annotation class D actual constructor()
|
||||
|
||||
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
||||
@A(42)
|
||||
@B(["OK", ""])
|
||||
@C
|
||||
@D()
|
||||
fun ok() {}
|
||||
@@ -0,0 +1,55 @@
|
||||
// test/D.class
|
||||
// ------------------------------------------
|
||||
public final annotation class test/D : kotlin/Annotation {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// test/OptionalAnnotationKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: ok()V
|
||||
public final fun ok(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package test {
|
||||
test/OptionalAnnotationKt
|
||||
}
|
||||
|
||||
// Optional annotations
|
||||
|
||||
public final expect annotation class test/A : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(I)V
|
||||
public constructor(x: kotlin/Int)
|
||||
|
||||
public final expect val x: kotlin/Int
|
||||
public final get
|
||||
|
||||
// module name: main
|
||||
}
|
||||
public final expect annotation class test/B : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Lkotlin/Array;)V
|
||||
public constructor(a: kotlin/Array<kotlin/String>)
|
||||
|
||||
public final expect val a: kotlin/Array<kotlin/String>
|
||||
public final get
|
||||
|
||||
// module name: main
|
||||
}
|
||||
public final expect annotation class test/C : kotlin/Annotation {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: main
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import java.io.File
|
||||
|
||||
class PlatformType {
|
||||
fun nullability() = File(".").absoluteFile
|
||||
|
||||
fun mutability() = File(".").toURI().toURL().openConnection().headerFields
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// PlatformType.class
|
||||
// ------------------------------------------
|
||||
public final class PlatformType : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: mutability()Ljava/util/Map;
|
||||
public final fun mutability(): kotlin/collections/MutableMap<kotlin/String!, kotlin/collections/MutableList<kotlin/String!>..kotlin/collections/List<kotlin/String!>?>..kotlin/collections/Map<kotlin/String!, kotlin/collections/MutableList<kotlin/String!>..kotlin/collections/List<kotlin/String!>?>?
|
||||
|
||||
// signature: nullability()Ljava/io/File;
|
||||
public final fun nullability(): java/io/File!
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
class C(val constructorParam: String = "") {
|
||||
val getterOnlyVal: Double get() = 0.0
|
||||
var accessorOnlyVar: Int
|
||||
get() = 1
|
||||
set(value) {}
|
||||
|
||||
var withBackingField: String = "42"
|
||||
|
||||
val <T : Number> T.delegated: List<Nothing> by null
|
||||
|
||||
val withOptimizedDelegate by C::getterOnlyVal
|
||||
|
||||
operator fun Nothing?.getValue(x: Any?, y: Any?) = emptyList<Nothing>()
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
// C.class
|
||||
// ------------------------------------------
|
||||
public final class C : kotlin/Any {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;)V
|
||||
public constructor(constructorParam: kotlin/String /* = ... */)
|
||||
|
||||
// signature: getValue(Ljava/lang/Void;Ljava/lang/Object;Ljava/lang/Object;)Ljava/util/List;
|
||||
public final operator fun kotlin/Nothing?.getValue(x: kotlin/Any?, y: kotlin/Any?): kotlin/collections/List<kotlin/Nothing>
|
||||
|
||||
// getter: getAccessorOnlyVar()I
|
||||
// setter: setAccessorOnlyVar(I)V
|
||||
public final var accessorOnlyVar: kotlin/Int
|
||||
public final /* non-default */ get
|
||||
public final /* non-default */ set(value: kotlin/Int)
|
||||
|
||||
// field: constructorParam:Ljava/lang/String;
|
||||
// getter: getConstructorParam()Ljava/lang/String;
|
||||
public final val constructorParam: kotlin/String
|
||||
public final get
|
||||
|
||||
// getter: getDelegated(Ljava/lang/Number;)Ljava/util/List;
|
||||
// synthetic method for delegate: getDelegated$delegate(LC;Ljava/lang/Number;)Ljava/lang/Object;
|
||||
public final /* delegated */ val <T#0 /* T */ : kotlin/Number> T#0.delegated: kotlin/collections/List<kotlin/Nothing>
|
||||
public final /* non-default */ get
|
||||
|
||||
// getter: getGetterOnlyVal()D
|
||||
public final val getterOnlyVal: kotlin/Double
|
||||
public final /* non-default */ get
|
||||
|
||||
// field: withBackingField:Ljava/lang/String;
|
||||
// getter: getWithBackingField()Ljava/lang/String;
|
||||
// setter: setWithBackingField(Ljava/lang/String;)V
|
||||
public final var withBackingField: kotlin/String
|
||||
public final get
|
||||
public final set
|
||||
|
||||
// getter: getWithOptimizedDelegate()D
|
||||
// synthetic method for delegate: getWithOptimizedDelegate$delegate(LC;)Ljava/lang/Object;
|
||||
public final /* delegated */ val withOptimizedDelegate: kotlin/Double
|
||||
public final /* non-default */ get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// IGNORE K2
|
||||
|
||||
class SimpleClass<in A>(val p: Int = 42) {
|
||||
constructor(s: Array<String?>?) : this(s?.size ?: 0)
|
||||
|
||||
var x: Long = p.toLong()
|
||||
external get
|
||||
@JvmName("SET_X") set
|
||||
|
||||
internal fun <U : A, V, A> A.f(vararg z: Map<V, U?>): Set<*> where V : A {
|
||||
error("")
|
||||
}
|
||||
|
||||
protected suspend inline fun <reified T> g(crossinline a: () -> A, noinline b: suspend () -> T) {}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// SimpleClass.class
|
||||
// ------------------------------------------
|
||||
public final class SimpleClass<in T#0 /* A */> : kotlin/Any {
|
||||
|
||||
// signature: <init>(I)V
|
||||
public constructor(p: kotlin/Int /* = ... */)
|
||||
|
||||
// signature: <init>([Ljava/lang/String;)V
|
||||
public /* secondary */ constructor(s: kotlin/Array<kotlin/String?>?)
|
||||
|
||||
// signature: f$test_module(Ljava/lang/Object;[Ljava/util/Map;)Ljava/util/Set;
|
||||
internal final fun <T#1 /* U */ : T#3, T#2 /* V */ : T#3, T#3 /* A */> T#3.f(vararg z: kotlin/collections/Map<T#2, T#1?> /* kotlin/Array<out kotlin/collections/Map<T#2, T#1?>> */): kotlin/collections/Set<*>
|
||||
|
||||
// signature: g(Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||
protected final inline suspend fun <reified T#1 /* T */> g(crossinline a: kotlin/Function0<T#0>, noinline b: suspend kotlin/Function1<kotlin/coroutines/Continuation<T#1>, kotlin/Any?>): kotlin/Unit
|
||||
|
||||
// field: p:I
|
||||
// getter: getP()I
|
||||
public final val p: kotlin/Int
|
||||
public final get
|
||||
|
||||
// field: x:J
|
||||
// getter: getX()J
|
||||
// setter: SET_X(J)V
|
||||
public final var x: kotlin/Long
|
||||
public final /* non-default */ external get
|
||||
public final /* non-default */ set(<set-?>: kotlin/Long)
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// SimplePackageKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: topLevelFun(Ljava/lang/Object;)Lkotlin/reflect/KClass;
|
||||
internal final inline fun <reified T#0 /* X */ : kotlin/Any> topLevelFun(x: T#0): kotlin/reflect/KClass<T#0>
|
||||
|
||||
// field: topLevelProp:Ljava/lang/String;
|
||||
// getter: getTopLevelProp()Ljava/lang/String;
|
||||
public final var topLevelProp: kotlin/String?
|
||||
public final get
|
||||
private final /* non-default */ set(value: kotlin/String?)
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
SimplePackageKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
internal inline fun <reified X : Any> topLevelFun(x: X) = X::class
|
||||
|
||||
var topLevelProp: String? = null
|
||||
private set
|
||||
@@ -0,0 +1,22 @@
|
||||
// SimplePackageKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: topLevelFun(Ljava/lang/Object;)Lkotlin/reflect/KClass;
|
||||
internal final inline fun <reified T#0 /* X */ : kotlin/Any> topLevelFun(x: T#0): kotlin/reflect/KClass<T#0>
|
||||
|
||||
// field: topLevelProp:Ljava/lang/String;
|
||||
// getter: getTopLevelProp()Ljava/lang/String;
|
||||
public final var topLevelProp: kotlin/String?
|
||||
public final get
|
||||
private final /* non-default */ set(<set-?>: kotlin/String?)
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
SimplePackageKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun f(a: AnnotationTarget): String? {
|
||||
return when (a) {
|
||||
AnnotationTarget.FUNCTION -> "1"
|
||||
AnnotationTarget.PROPERTY -> "2"
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// SyntheticClassKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: f(Lkotlin/annotation/AnnotationTarget;)Ljava/lang/String;
|
||||
public final fun f(a: kotlin/annotation/AnnotationTarget): kotlin/String?
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// SyntheticClassKt$WhenMappings.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
SyntheticClassKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// TypeAliasKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
public typealias F<T#0 /* T */, T#1 /* U */> = kotlin/collections/Map<T#0, kotlin/Function1<java/lang/StringBuilder /* = kotlin/text/StringBuilder^ */, T#1?>> /* = kotlin/collections/Map<T#0, kotlin/Function1<java/lang/StringBuilder /* = kotlin/text/StringBuilder^ */, T#1?>> */
|
||||
|
||||
public typealias G<T#0 /* S */> = kotlin/collections/Map<kotlin/collections/List<T#0>, kotlin/Function1<java/lang/StringBuilder /* = kotlin/text/StringBuilder^ */, kotlin/collections/Set<T#0>?>> /* = F^<kotlin/collections/List<T#0>, kotlin/collections/Set<T#0>> */ /* = kotlin/collections/Map<kotlin/collections/List<T#0>, kotlin/Function1<java/lang/StringBuilder /* = kotlin/text/StringBuilder^ */, kotlin/collections/Set<T#0>?>> */
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
TypeAliasKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
typealias F<T, U> = Map<T, (StringBuilder) -> U?>
|
||||
|
||||
typealias G<S> = F<List<S>, Set<S>>
|
||||
@@ -0,0 +1,17 @@
|
||||
// TypeAliasKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
public typealias F<T#0 /* T */, T#1 /* U */> = kotlin/collections/Map<T#0, kotlin/Function1<kotlin/text/StringBuilder^, T#1?>> /* = kotlin/collections/Map<T#0, kotlin/Function1<java/lang/StringBuilder /* = kotlin/text/StringBuilder^ */, T#1?>> */
|
||||
|
||||
public typealias G<T#0 /* S */> = F^<kotlin/collections/List<T#0>, kotlin/collections/Set<T#0>> /* = kotlin/collections/Map<kotlin/collections/List<T#0>, kotlin/Function1<java/lang/StringBuilder /* = kotlin/text/StringBuilder^ */, kotlin/collections/Set<T#0>?>> */
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
TypeAliasKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
class A<T> {
|
||||
fun <T> a(t: T) {}
|
||||
|
||||
fun <U> f(m: Map.Entry<T, U>) {}
|
||||
|
||||
inner class B<U, V : U> {
|
||||
fun <T, U> b(t: T, u: U & Any, v: V) where T : Comparable<T>, T : Cloneable {}
|
||||
|
||||
fun bb(t: T) {}
|
||||
|
||||
inner class C<T, U> {
|
||||
fun <T, U> c(t: T?, u: U?) {}
|
||||
|
||||
fun cc(t: T?, u: U?) {}
|
||||
|
||||
fun z(c: A<Int>.B<Any, Byte>.C<Unit, Long>) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final class A<T#0 /* T */> : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: a(Ljava/lang/Object;)V
|
||||
public final fun <T#1 /* T */> a(t: T#1): kotlin/Unit
|
||||
|
||||
// signature: f(Ljava/util/Map$Entry;)V
|
||||
public final fun <T#1 /* U */> f(m: kotlin/collections/Map.Entry<T#0, T#1>): kotlin/Unit
|
||||
|
||||
// nested class: B
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$B.class
|
||||
// ------------------------------------------
|
||||
public final inner class A.B<T#1 /* U */, T#2 /* V */ : T#1> : kotlin/Any {
|
||||
|
||||
// signature: <init>(LA;)V
|
||||
public constructor()
|
||||
|
||||
// requires language version 1.7.0 (level=ERROR)
|
||||
// signature: b(Ljava/lang/Comparable;Ljava/lang/Object;Ljava/lang/Object;)V
|
||||
public final fun <T#3 /* T */ : kotlin/Comparable<T#3> & kotlin/Cloneable, T#4 /* U */> b(t: T#3, u: T#4 & Any, v: T#2): kotlin/Unit
|
||||
|
||||
// signature: bb(Ljava/lang/Object;)V
|
||||
public final fun bb(t: T#0): kotlin/Unit
|
||||
|
||||
// nested class: C
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$B$C.class
|
||||
// ------------------------------------------
|
||||
public final inner class A.B.C<T#3 /* T */, T#4 /* U */> : kotlin/Any {
|
||||
|
||||
// signature: <init>(LA$B;)V
|
||||
public constructor()
|
||||
|
||||
// signature: c(Ljava/lang/Object;Ljava/lang/Object;)V
|
||||
public final fun <T#5 /* T */, T#6 /* U */> c(t: T#5?, u: T#6?): kotlin/Unit
|
||||
|
||||
// signature: cc(Ljava/lang/Object;Ljava/lang/Object;)V
|
||||
public final fun cc(t: T#3?, u: T#4?): kotlin/Unit
|
||||
|
||||
// signature: z(LA$B$C;)V
|
||||
public final fun z(c: A<kotlin/Int>.B<kotlin/Any, kotlin/Byte>.C<kotlin/Unit, kotlin/Long>): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
@JvmInline
|
||||
value class A(private val i: Int?)
|
||||
|
||||
@JvmInline
|
||||
value class B(private val f: suspend () -> Unit)
|
||||
|
||||
@JvmInline
|
||||
value class Z(val s: String)
|
||||
@@ -0,0 +1,83 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final value class A : kotlin/Any {
|
||||
|
||||
// signature: constructor-impl(Ljava/lang/Integer;)Ljava/lang/Integer;
|
||||
public constructor(i: kotlin/Int?)
|
||||
|
||||
// signature: equals-impl(Ljava/lang/Integer;Ljava/lang/Object;)Z
|
||||
public open /* synthesized */ operator fun equals(other: kotlin/Any?): kotlin/Boolean
|
||||
|
||||
// signature: hashCode-impl(Ljava/lang/Integer;)I
|
||||
public open /* synthesized */ fun hashCode(): kotlin/Int
|
||||
|
||||
// signature: toString-impl(Ljava/lang/Integer;)Ljava/lang/String;
|
||||
public open /* synthesized */ fun toString(): kotlin/String
|
||||
|
||||
// field: i:Ljava/lang/Integer;
|
||||
private final val i: kotlin/Int?
|
||||
private final get
|
||||
|
||||
// underlying property: i
|
||||
|
||||
// underlying type: kotlin/Int?
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
public final value class B : kotlin/Any {
|
||||
|
||||
// signature: constructor-impl(Lkotlin/jvm/functions/Function1;)Lkotlin/jvm/functions/Function1;
|
||||
public constructor(f: suspend kotlin/Function1<kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>)
|
||||
|
||||
// signature: equals-impl(Lkotlin/jvm/functions/Function1;Ljava/lang/Object;)Z
|
||||
public open /* synthesized */ operator fun equals(other: kotlin/Any?): kotlin/Boolean
|
||||
|
||||
// signature: hashCode-impl(Lkotlin/jvm/functions/Function1;)I
|
||||
public open /* synthesized */ fun hashCode(): kotlin/Int
|
||||
|
||||
// signature: toString-impl(Lkotlin/jvm/functions/Function1;)Ljava/lang/String;
|
||||
public open /* synthesized */ fun toString(): kotlin/String
|
||||
|
||||
// field: f:Lkotlin/jvm/functions/Function1;
|
||||
private final val f: suspend kotlin/Function1<kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>
|
||||
private final get
|
||||
|
||||
// underlying property: f
|
||||
|
||||
// underlying type: suspend kotlin/Function1<kotlin/coroutines/Continuation<kotlin/Unit>, kotlin/Any?>
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// Z.class
|
||||
// ------------------------------------------
|
||||
public final value class Z : kotlin/Any {
|
||||
|
||||
// signature: constructor-impl(Ljava/lang/String;)Ljava/lang/String;
|
||||
public constructor(s: kotlin/String)
|
||||
|
||||
// signature: equals-impl(Ljava/lang/String;Ljava/lang/Object;)Z
|
||||
public open /* synthesized */ operator fun equals(other: kotlin/Any?): kotlin/Boolean
|
||||
|
||||
// signature: hashCode-impl(Ljava/lang/String;)I
|
||||
public open /* synthesized */ fun hashCode(): kotlin/Int
|
||||
|
||||
// signature: toString-impl(Ljava/lang/String;)Ljava/lang/String;
|
||||
public open /* synthesized */ fun toString(): kotlin/String
|
||||
|
||||
// field: s:Ljava/lang/String;
|
||||
// getter: getS()Ljava/lang/String;
|
||||
public final val s: kotlin/String
|
||||
public final get
|
||||
|
||||
// underlying property: s
|
||||
|
||||
// underlying type: kotlin/String
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class AnnoString(vararg val value: String)
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class AnnoInt(vararg val value: Int)
|
||||
|
||||
enum class A { V1, V2 }
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class AnnoEnum(vararg val value: A)
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class AnnoKClass(vararg val value: KClass<*>)
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class AnnoAnnotation(vararg val value: AnnoString)
|
||||
|
||||
fun annoStringVararg0(): @AnnoString() Unit {}
|
||||
fun annoStringVararg1(): @AnnoString("OK") Unit {}
|
||||
fun annoStringVararg2(): @AnnoString("OK", "OK2") Unit {}
|
||||
|
||||
fun annoIntVararg0(): @AnnoInt() Unit {}
|
||||
fun annoIntVararg1(): @AnnoInt(0) Unit {}
|
||||
fun annoIntVararg2(): @AnnoInt(0, 1) Unit {}
|
||||
|
||||
fun annoEnumVararg0(): @AnnoEnum() Unit {}
|
||||
fun annoEnumVararg1(): @AnnoEnum(A.V1) Unit {}
|
||||
fun annoEnumVararg2(): @AnnoEnum(A.V1, A.V2) Unit {}
|
||||
|
||||
fun annoKClassVararg0(): @AnnoKClass() Unit {}
|
||||
fun annoKClassVararg1(): @AnnoKClass(AnnoString::class) Unit {}
|
||||
fun annoKClassVararg2(): @AnnoKClass(AnnoString::class, AnnoInt::class) Unit {}
|
||||
|
||||
fun annoAnnotationVararg0(): @AnnoAnnotation() Unit {}
|
||||
fun annoAnnotationVararg1(): @AnnoAnnotation(AnnoString()) Unit {}
|
||||
fun annoAnnotationVararg2(): @AnnoAnnotation(AnnoString("OK"), AnnoString("OK1", "OK2")) Unit {}
|
||||
|
||||
fun annoArrayVararg0(): @AnnoString(*arrayOf()) Unit {}
|
||||
fun annoArrayVararg1(): @AnnoString(*arrayOf("OK")) Unit {}
|
||||
fun annoArrayVararg2(): @AnnoString(*arrayOf("OK", "OK2")) Unit {}
|
||||
@@ -0,0 +1,147 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final enum class A : kotlin/Enum<A> {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;I)V
|
||||
private constructor()
|
||||
|
||||
V1,
|
||||
|
||||
V2,
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has Enum.entries
|
||||
}
|
||||
// AnnoAnnotation.class
|
||||
// ------------------------------------------
|
||||
public final annotation class AnnoAnnotation : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Lkotlin/Array;)V
|
||||
public constructor(vararg value: AnnoString /* kotlin/Array<out AnnoString> */)
|
||||
|
||||
// getter: value()[LAnnoString;
|
||||
public final val value: kotlin/Array<out AnnoString>
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// AnnoEnum.class
|
||||
// ------------------------------------------
|
||||
public final annotation class AnnoEnum : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Lkotlin/Array;)V
|
||||
public constructor(vararg value: A /* kotlin/Array<out A> */)
|
||||
|
||||
// getter: value()[LA;
|
||||
public final val value: kotlin/Array<out A>
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// AnnoInt.class
|
||||
// ------------------------------------------
|
||||
public final annotation class AnnoInt : kotlin/Annotation {
|
||||
|
||||
// signature: <init>([I)V
|
||||
public constructor(vararg value: kotlin/Int /* kotlin/IntArray */)
|
||||
|
||||
// getter: value()[I
|
||||
public final val value: kotlin/IntArray
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// AnnoKClass.class
|
||||
// ------------------------------------------
|
||||
public final annotation class AnnoKClass : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Lkotlin/Array;)V
|
||||
public constructor(vararg value: kotlin/reflect/KClass<*> /* kotlin/Array<out kotlin/reflect/KClass<*>> */)
|
||||
|
||||
// getter: value()[Ljava/lang/Class;
|
||||
public final val value: kotlin/Array<out kotlin/reflect/KClass<*>>
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// AnnoString.class
|
||||
// ------------------------------------------
|
||||
public final annotation class AnnoString : kotlin/Annotation {
|
||||
|
||||
// signature: <init>(Lkotlin/Array;)V
|
||||
public constructor(vararg value: kotlin/String /* kotlin/Array<out kotlin/String> */)
|
||||
|
||||
// getter: value()[Ljava/lang/String;
|
||||
public final val value: kotlin/Array<out kotlin/String>
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// VarargInAnnotationKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: annoAnnotationVararg0()V
|
||||
public final fun annoAnnotationVararg0(): @AnnoAnnotation(value = []) kotlin/Unit
|
||||
|
||||
// signature: annoAnnotationVararg1()V
|
||||
public final fun annoAnnotationVararg1(): @AnnoAnnotation(value = [AnnoString(value = [])]) kotlin/Unit
|
||||
|
||||
// signature: annoAnnotationVararg2()V
|
||||
public final fun annoAnnotationVararg2(): @AnnoAnnotation(value = [AnnoString(value = ["OK"]), AnnoString(value = ["OK1", "OK2"])]) kotlin/Unit
|
||||
|
||||
// signature: annoArrayVararg0()V
|
||||
public final fun annoArrayVararg0(): @AnnoString(value = []) kotlin/Unit
|
||||
|
||||
// signature: annoArrayVararg1()V
|
||||
public final fun annoArrayVararg1(): @AnnoString(value = ["OK"]) kotlin/Unit
|
||||
|
||||
// signature: annoArrayVararg2()V
|
||||
public final fun annoArrayVararg2(): @AnnoString(value = ["OK", "OK2"]) kotlin/Unit
|
||||
|
||||
// signature: annoEnumVararg0()V
|
||||
public final fun annoEnumVararg0(): @AnnoEnum(value = []) kotlin/Unit
|
||||
|
||||
// signature: annoEnumVararg1()V
|
||||
public final fun annoEnumVararg1(): @AnnoEnum(value = [A.V1]) kotlin/Unit
|
||||
|
||||
// signature: annoEnumVararg2()V
|
||||
public final fun annoEnumVararg2(): @AnnoEnum(value = [A.V1, A.V2]) kotlin/Unit
|
||||
|
||||
// signature: annoIntVararg0()V
|
||||
public final fun annoIntVararg0(): @AnnoInt(value = []) kotlin/Unit
|
||||
|
||||
// signature: annoIntVararg1()V
|
||||
public final fun annoIntVararg1(): @AnnoInt(value = [0]) kotlin/Unit
|
||||
|
||||
// signature: annoIntVararg2()V
|
||||
public final fun annoIntVararg2(): @AnnoInt(value = [0, 1]) kotlin/Unit
|
||||
|
||||
// signature: annoKClassVararg0()V
|
||||
public final fun annoKClassVararg0(): @AnnoKClass(value = []) kotlin/Unit
|
||||
|
||||
// signature: annoKClassVararg1()V
|
||||
public final fun annoKClassVararg1(): @AnnoKClass(value = [AnnoString::class]) kotlin/Unit
|
||||
|
||||
// signature: annoKClassVararg2()V
|
||||
public final fun annoKClassVararg2(): @AnnoKClass(value = [AnnoString::class, AnnoInt::class]) kotlin/Unit
|
||||
|
||||
// signature: annoStringVararg0()V
|
||||
public final fun annoStringVararg0(): @AnnoString(value = []) kotlin/Unit
|
||||
|
||||
// signature: annoStringVararg1()V
|
||||
public final fun annoStringVararg1(): @AnnoString(value = ["OK"]) kotlin/Unit
|
||||
|
||||
// signature: annoStringVararg2()V
|
||||
public final fun annoStringVararg2(): @AnnoString(value = ["OK", "OK2"]) kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
VarargInAnnotationKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
package test
|
||||
|
||||
import kotlin.internal.RequireKotlin
|
||||
import kotlin.internal.RequireKotlinVersionKind
|
||||
|
||||
@RequireKotlin("1.2", "Klass must not be used!", DeprecationLevel.WARNING, RequireKotlinVersionKind.API_VERSION)
|
||||
class Klass
|
||||
|
||||
class Konstructor @RequireKotlin("42.0", "Konstructor must not be used!", DeprecationLevel.WARNING, RequireKotlinVersionKind.LANGUAGE_VERSION, 42) constructor()
|
||||
|
||||
@RequireKotlin("1.1", level = DeprecationLevel.HIDDEN, versionKind = RequireKotlinVersionKind.API_VERSION, errorCode = 314)
|
||||
typealias Typealias = String
|
||||
|
||||
@RequireKotlin("1.2.40", level = DeprecationLevel.ERROR, versionKind = RequireKotlinVersionKind.COMPILER_VERSION)
|
||||
fun function() {}
|
||||
|
||||
@RequireKotlin("1.3", "property must not be used!")
|
||||
val property = ""
|
||||
@@ -0,0 +1,47 @@
|
||||
// test/Klass.class
|
||||
// ------------------------------------------
|
||||
// requires API version 1.2.0 (level=WARNING, message="Klass must not be used!")
|
||||
public final class test/Klass : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// test/Konstructor.class
|
||||
// ------------------------------------------
|
||||
public final class test/Konstructor : kotlin/Any {
|
||||
|
||||
// requires language version 42.0.0 (level=WARNING, errorCode=42, message="Konstructor must not be used!")
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// test/VersionRequirementKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// requires compiler version 1.2.40 (level=ERROR)
|
||||
// signature: function()V
|
||||
public final fun function(): kotlin/Unit
|
||||
|
||||
// requires language version 1.3.0 (level=ERROR, message="property must not be used!")
|
||||
// field: property:Ljava/lang/String;
|
||||
// getter: getProperty()Ljava/lang/String;
|
||||
// synthetic method for annotations: getProperty$annotations()V
|
||||
public final val property: kotlin/String /* = ... */
|
||||
public final get
|
||||
|
||||
// requires API version 1.1.0 (level=HIDDEN, errorCode=314)
|
||||
public typealias Typealias = kotlin/String /* = kotlin/String */
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package test {
|
||||
test/VersionRequirementKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
|
||||
interface A {
|
||||
fun f() {}
|
||||
fun g()
|
||||
}
|
||||
|
||||
interface B : A {
|
||||
override fun g() {}
|
||||
}
|
||||
|
||||
class C : B
|
||||
@@ -0,0 +1,40 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
// requires compiler version 1.4.0 (level=ERROR)
|
||||
public abstract interface A : kotlin/Any {
|
||||
|
||||
// signature: f()V
|
||||
public open fun f(): kotlin/Unit
|
||||
|
||||
// signature: g()V
|
||||
public abstract fun g(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
}
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
// requires compiler version 1.4.0 (level=ERROR)
|
||||
public abstract interface B : A {
|
||||
|
||||
// signature: g()V
|
||||
public open fun g(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
}
|
||||
// C.class
|
||||
// ------------------------------------------
|
||||
public final class C : B {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
|
||||
interface A {
|
||||
fun f() {}
|
||||
fun g()
|
||||
}
|
||||
|
||||
interface B : A {
|
||||
override fun g() {}
|
||||
}
|
||||
|
||||
class C : B
|
||||
@@ -0,0 +1,48 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public abstract interface A : kotlin/Any {
|
||||
|
||||
// signature: f()V
|
||||
public open fun f(): kotlin/Unit
|
||||
|
||||
// signature: g()V
|
||||
public abstract fun g(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
|
||||
// is compiled in compatibility mode
|
||||
}
|
||||
// A$DefaultImpls.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
public abstract interface B : A {
|
||||
|
||||
// signature: g()V
|
||||
public open fun g(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
|
||||
// is compiled in compatibility mode
|
||||
}
|
||||
// B$DefaultImpls.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// C.class
|
||||
// ------------------------------------------
|
||||
public final class C : B {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// !JVM_DEFAULT_MODE: all
|
||||
@JvmDefaultWithCompatibility
|
||||
interface A {
|
||||
fun f() {}
|
||||
}
|
||||
|
||||
@JvmDefaultWithCompatibility
|
||||
interface B : A
|
||||
@@ -0,0 +1,35 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
// requires compiler version 1.4.0 (level=ERROR)
|
||||
public abstract interface A : kotlin/Any {
|
||||
|
||||
// signature: f()V
|
||||
public open fun f(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
|
||||
// is compiled in compatibility mode
|
||||
}
|
||||
// A$DefaultImpls.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
// requires compiler version 1.4.0 (level=ERROR)
|
||||
public abstract interface B : A {
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
|
||||
// is compiled in compatibility mode
|
||||
}
|
||||
// B$DefaultImpls.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// !JVM_DEFAULT_MODE: all-compatibility
|
||||
@JvmDefaultWithoutCompatibility
|
||||
interface A {
|
||||
fun f() {}
|
||||
}
|
||||
|
||||
interface B : A
|
||||
@@ -0,0 +1,28 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public abstract interface A : kotlin/Any {
|
||||
|
||||
// signature: f()V
|
||||
public open fun f(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
}
|
||||
// B.class
|
||||
// ------------------------------------------
|
||||
public abstract interface B : A {
|
||||
|
||||
// module name: test-module
|
||||
|
||||
// has method bodies in interface
|
||||
|
||||
// is compiled in compatibility mode
|
||||
}
|
||||
// B$DefaultImpls.class
|
||||
// ------------------------------------------
|
||||
synthetic class
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun test() = object : Runnable {
|
||||
override fun run() { }
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// AnonymousObjectKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: test()Ljava/lang/Runnable;
|
||||
public final fun test(): java/lang/Runnable
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// AnonymousObjectKt$test$1.class
|
||||
// ------------------------------------------
|
||||
local final class .AnonymousObjectKt$test$1 : java/lang/Runnable {
|
||||
|
||||
// signature: run()V
|
||||
public open fun run(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
AnonymousObjectKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
fun test() {
|
||||
class Local {
|
||||
inner class Inner {
|
||||
val prop = object {
|
||||
fun foo() {
|
||||
fun bar() {
|
||||
class DeepLocal {
|
||||
inner class Deepest {
|
||||
fun local(): Local = Local()
|
||||
fun inner(): Inner = Inner()
|
||||
fun deep(): DeepLocal = DeepLocal()
|
||||
fun deepest(): Deepest? = Deepest()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
// DeepInnerLocalChainKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: test()V
|
||||
public final fun test(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local.class
|
||||
// ------------------------------------------
|
||||
local final class .DeepInnerLocalChainKt$test$Local : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// nested class: Inner
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner.class
|
||||
// ------------------------------------------
|
||||
local final inner class .DeepInnerLocalChainKt$test$Local.Inner : kotlin/Any {
|
||||
|
||||
// signature: <init>(LDeepInnerLocalChainKt$test$Local;)V
|
||||
public constructor()
|
||||
|
||||
// field: prop:LDeepInnerLocalChainKt$test$Local$Inner$prop$1;
|
||||
// getter: getProp()LDeepInnerLocalChainKt$test$Local$Inner$prop$1;
|
||||
public final val prop: .DeepInnerLocalChainKt$test$Local$Inner$prop$1
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner$prop$1.class
|
||||
// ------------------------------------------
|
||||
local final class .DeepInnerLocalChainKt$test$Local$Inner$prop$1 : kotlin/Any {
|
||||
|
||||
// signature: foo()V
|
||||
public final fun foo(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal.class
|
||||
// ------------------------------------------
|
||||
local final class .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal : kotlin/Any {
|
||||
|
||||
// signature: <init>(LDeepInnerLocalChainKt$test$Local;)V
|
||||
public constructor()
|
||||
|
||||
// nested class: Deepest
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal$Deepest.class
|
||||
// ------------------------------------------
|
||||
local final inner class .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal.Deepest : kotlin/Any {
|
||||
|
||||
// signature: <init>(LDeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal;)V
|
||||
public constructor()
|
||||
|
||||
// signature: deep()LDeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal;
|
||||
public final fun deep(): .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal
|
||||
|
||||
// signature: deepest()LDeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal$Deepest;
|
||||
public final fun deepest(): .DeepInnerLocalChainKt$test$Local$Inner$prop$1$foo$bar$DeepLocal.Deepest?
|
||||
|
||||
// signature: inner()LDeepInnerLocalChainKt$test$Local$Inner;
|
||||
public final fun inner(): .DeepInnerLocalChainKt$test$Local.Inner
|
||||
|
||||
// signature: local()LDeepInnerLocalChainKt$test$Local;
|
||||
public final fun local(): .DeepInnerLocalChainKt$test$Local
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
DeepInnerLocalChainKt
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final class A : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$L.class
|
||||
// ------------------------------------------
|
||||
local final class .A$L<T#0 /* T */> : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: x(LA$L;)V
|
||||
public final fun x(l: .A$L<.A.L.I>): kotlin/Unit
|
||||
|
||||
// nested class: I
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$L$I.class
|
||||
// ------------------------------------------
|
||||
local final inner class .A.L.I : kotlin/Any {
|
||||
|
||||
// signature: <init>(LA$L;)V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
init {
|
||||
class L<T> {
|
||||
inner class I
|
||||
|
||||
fun x(l: L<I>) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
// A.class
|
||||
// ------------------------------------------
|
||||
public final class A : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$L.class
|
||||
// ------------------------------------------
|
||||
local final class .A$L<T#0 /* T */> : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: x(LA$L;)V
|
||||
public final fun x(l: .A$L<.A$L<T#0>.I>): kotlin/Unit
|
||||
|
||||
// nested class: I
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// A$L$I.class
|
||||
// ------------------------------------------
|
||||
local final inner class .A$L.I : kotlin/Any {
|
||||
|
||||
// signature: <init>(LA$L;)V
|
||||
public constructor()
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fun test() {
|
||||
open class Local {
|
||||
fun param(l: Local) {}
|
||||
|
||||
val returnType: Local = this
|
||||
|
||||
fun Local.receiver() = this
|
||||
|
||||
fun <T : Local, U : T> generic(t: T): U = null!!
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// LocalClassInSignatureKt.class
|
||||
// ------------------------------------------
|
||||
package {
|
||||
|
||||
// signature: test()V
|
||||
public final fun test(): kotlin/Unit
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// LocalClassInSignatureKt$test$Local.class
|
||||
// ------------------------------------------
|
||||
local open class .LocalClassInSignatureKt$test$Local : kotlin/Any {
|
||||
|
||||
// signature: <init>()V
|
||||
public constructor()
|
||||
|
||||
// signature: generic(LLocalClassInSignatureKt$test$Local;)LLocalClassInSignatureKt$test$Local;
|
||||
public final fun <T#0 /* T */ : .LocalClassInSignatureKt$test$Local, T#1 /* U */ : T#0> generic(t: T#0): T#1
|
||||
|
||||
// signature: param(LLocalClassInSignatureKt$test$Local;)V
|
||||
public final fun param(l: .LocalClassInSignatureKt$test$Local): kotlin/Unit
|
||||
|
||||
// signature: receiver(LLocalClassInSignatureKt$test$Local;)LLocalClassInSignatureKt$test$Local;
|
||||
public final fun .LocalClassInSignatureKt$test$Local.receiver(): .LocalClassInSignatureKt$test$Local
|
||||
|
||||
// field: returnType:LLocalClassInSignatureKt$test$Local;
|
||||
// getter: getReturnType()LLocalClassInSignatureKt$test$Local;
|
||||
public final val returnType: .LocalClassInSignatureKt$test$Local
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
package <root> {
|
||||
LocalClassInSignatureKt
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
val a = 42
|
||||
|
||||
class A(val p: String)
|
||||
|
||||
fun A.foo() = p
|
||||
|
||||
class B<T>(val v: T & Any)
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
// ScriptSimple.class
|
||||
// ------------------------------------------
|
||||
public final class ScriptSimple {
|
||||
|
||||
// signature: foo(LScriptSimple$A;)Ljava/lang/String;
|
||||
public final fun A.foo(): kotlin/String
|
||||
|
||||
// field: a:I
|
||||
// getter: getA()I
|
||||
public final val a: kotlin/Int /* = ... */
|
||||
public final get
|
||||
|
||||
// nested class: A
|
||||
|
||||
// nested class: B
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// ScriptSimple$A.class
|
||||
// ------------------------------------------
|
||||
public final class A : kotlin/Any {
|
||||
|
||||
// signature: <init>(Ljava/lang/String;)V
|
||||
public constructor(p: kotlin/String)
|
||||
|
||||
// field: p:Ljava/lang/String;
|
||||
// getter: getP()Ljava/lang/String;
|
||||
public final val p: kotlin/String
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// ScriptSimple$B.class
|
||||
// ------------------------------------------
|
||||
public final class B<T#0 /* T */> : kotlin/Any {
|
||||
|
||||
// requires language version 1.7.0 (level=ERROR)
|
||||
// signature: <init>(Ljava/lang/Object;)V
|
||||
public constructor(v: T#0 & Any)
|
||||
|
||||
// requires language version 1.7.0 (level=ERROR)
|
||||
// field: v:Ljava/lang/Object;
|
||||
// getter: getV()Ljava/lang/Object;
|
||||
public final val v: T#0 & Any
|
||||
public final get
|
||||
|
||||
// module name: test-module
|
||||
}
|
||||
// META-INF/test-module.kotlin_module
|
||||
// ------------------------------------------
|
||||
module {
|
||||
}
|
||||
Reference in New Issue
Block a user