Correctly rearrange arguments for annotation constructors copied from another module
It won't fix KT-48181 completely, but it will allow to create such annotations if all value arguments are specified. For the full fix, we need to read default annotation values from classfiles in jar. #KT-48181 In progress
This commit is contained in:
+23
@@ -0,0 +1,23 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
|
||||
// WITH_RUNTIME
|
||||
// !LANGUAGE: +InstantiationOfAnnotationClasses
|
||||
|
||||
fun f(): Metadata = Metadata(
|
||||
kind = 0,
|
||||
metadataVersion = intArrayOf(),
|
||||
data1 = arrayOf(),
|
||||
data2 = arrayOf(),
|
||||
extraString = "",
|
||||
packageName = "foo",
|
||||
extraInt = 0,
|
||||
bytecodeVersion = intArrayOf(1, 0, 3),
|
||||
)
|
||||
|
||||
fun box(): String {
|
||||
val m = f()
|
||||
if (m.toString() == """@kotlin.Metadata(bytecodeVersion=[1, 0, 3], data1=[], data2=[], extraInt=0, extraString=, kind=0, metadataVersion=[], packageName=foo)""")
|
||||
return "OK"
|
||||
return m.toString()
|
||||
}
|
||||
Reference in New Issue
Block a user