K2: add bytecode listing tests
#KT-57171 Fixed
This commit is contained in:
+4
-1
@@ -1,6 +1,9 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// WITH_STDLIB
|
||||
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57211 K2: incorrect "error: an annotation argument must be a compile-time constant" on unsigned array in annotation argument
|
||||
|
||||
annotation class Ann(
|
||||
val u: UInt,
|
||||
val uba: UByteArray,
|
||||
@@ -16,4 +19,4 @@ annotation class Ann(
|
||||
[1u, 1u],
|
||||
ulongArrayOf(1u, 1u)
|
||||
)
|
||||
fun foo() {}
|
||||
fun foo() {}
|
||||
|
||||
Vendored
+3
-1
@@ -1,4 +1,6 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57216 K2: non-trivial enum declaration does not have ACC_FINAL in the bytecode
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
@@ -23,4 +25,4 @@ enum class TestEnum(val z: Z) {
|
||||
|
||||
class TestInner {
|
||||
inner class Inner(val z: Z)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1,5 +1,9 @@
|
||||
// IGNORE_ANNOTATIONS
|
||||
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57268 K2: extra methods `remove` and/or `getOrDefault` are generated for Map subclasses with JDK 1.6 in dependencies
|
||||
// (in this case, it's `getOrDefault-impl` because of inline class mangling, and then `remove` is unmangled for some reason)
|
||||
|
||||
inline class InlineMap<K, V>(private val map: Map<K, V>) : Map<K, V> {
|
||||
override val entries: Set<Map.Entry<K, V>> get() = map.entries
|
||||
override val keys: Set<K> get() = map.keys
|
||||
@@ -10,4 +14,3 @@ inline class InlineMap<K, V>(private val map: Map<K, V>) : Map<K, V> {
|
||||
override fun get(key: K): V? = map[key]
|
||||
override fun isEmpty(): Boolean = map.isEmpty()
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -1,5 +1,9 @@
|
||||
// IGNORE_ANNOTATIONS
|
||||
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57268 K2: extra methods `remove` and/or `getOrDefault` are generated for Map subclasses with JDK 1.6 in dependencies
|
||||
// (in this case, it's `remove-impl`/`getOrDefault-impl` because of inline class mangling)
|
||||
|
||||
inline class InlineMutableMap<K, V>(private val mmap: MutableMap<K, V>) : MutableMap<K, V> {
|
||||
override val size: Int get() = mmap.size
|
||||
override fun containsKey(key: K): Boolean = mmap.containsKey(key)
|
||||
@@ -14,4 +18,3 @@ inline class InlineMutableMap<K, V>(private val mmap: MutableMap<K, V>) : Mutabl
|
||||
override fun putAll(from: Map<out K, V>) { mmap.putAll(from) }
|
||||
override fun remove(key: K): V? = mmap.remove(key)
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-1
@@ -1,5 +1,9 @@
|
||||
// IGNORE_ANNOTATIONS
|
||||
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57268 K2: extra methods `remove` and/or `getOrDefault` are generated for Map subclasses with JDK 1.6 in dependencies
|
||||
// (in this case, it's `getOrDefault-h8vw2VU` because of inline class mangling, and then `remove` is unmangled for some reason)
|
||||
|
||||
inline class IK(val x: Int)
|
||||
inline class IV(val x: Double)
|
||||
|
||||
@@ -13,4 +17,3 @@ inline class InlineMap(private val map: Map<IK, IV>) : Map<IK, IV> {
|
||||
override fun get(key: IK): IV? = map[key]
|
||||
override fun isEmpty(): Boolean = map.isEmpty()
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-1
@@ -1,5 +1,9 @@
|
||||
// IGNORE_ANNOTATIONS
|
||||
|
||||
// IGNORE_BACKEND_K2: JVM_IR
|
||||
// FIR status: KT-57268 K2: extra methods `remove` and/or `getOrDefault` are generated for Map subclasses with JDK 1.6 in dependencies
|
||||
// (in this case, it's `remove-YEowaJk`/`getOrDefault-h8vw2VU` because of inline class mangling)
|
||||
|
||||
inline class IK(val x: Int)
|
||||
inline class IV(val x: Double)
|
||||
|
||||
@@ -17,4 +21,3 @@ inline class InlineMutableMap(private val mmap: MutableMap<IK, IV>) : MutableMap
|
||||
override fun putAll(from: Map<out IK, IV>) { mmap.putAll(from) }
|
||||
override fun remove(key: IK): IV? = mmap.remove(key)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user