[FIR] Serialize type annotations of vararg parameters in metadata
^KT-63899: Fixed
This commit is contained in:
committed by
Space Team
parent
36d5ffd4eb
commit
1e7cc00dcb
+2
-1
@@ -784,7 +784,7 @@ class FirElementSerializer private constructor(
|
|||||||
parameter: FirValueParameter,
|
parameter: FirValueParameter,
|
||||||
index: Int,
|
index: Int,
|
||||||
function: FirFunction,
|
function: FirFunction,
|
||||||
additionalAnnotations: List<FirAnnotation> = emptyList()
|
additionalAnnotations: List<FirAnnotation> = emptyList(),
|
||||||
): ProtoBuf.ValueParameter.Builder = whileAnalysing(session, parameter) {
|
): ProtoBuf.ValueParameter.Builder = whileAnalysing(session, parameter) {
|
||||||
val builder = ProtoBuf.ValueParameter.newBuilder()
|
val builder = ProtoBuf.ValueParameter.newBuilder()
|
||||||
|
|
||||||
@@ -812,6 +812,7 @@ class FirElementSerializer private constructor(
|
|||||||
|
|
||||||
if (parameter.isVararg) {
|
if (parameter.isVararg) {
|
||||||
val varargElementType = parameter.returnTypeRef.coneType.varargElementType()
|
val varargElementType = parameter.returnTypeRef.coneType.varargElementType()
|
||||||
|
.withAttributes(parameter.returnTypeRef.annotations.computeTypeAttributes(session, shouldExpandTypeAliases = false))
|
||||||
if (useTypeTable()) {
|
if (useTypeTable()) {
|
||||||
builder.varargElementTypeId = typeId(varargElementType)
|
builder.varargElementTypeId = typeId(varargElementType)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Vendored
-9
@@ -1,9 +0,0 @@
|
|||||||
MODULE lib
|
|
||||||
CLASS LibKt.class
|
|
||||||
PACKAGE METADATA
|
|
||||||
FUNCTION withVararg([B)V
|
|
||||||
Property: class.metadata.function.valueParameters
|
|
||||||
K1
|
|
||||||
(vararg args: @TypeAnnotation(str = "ByteAnno") kotlin/Byte /* kotlin/ByteArray */)
|
|
||||||
K2
|
|
||||||
(vararg args: kotlin/Byte /* kotlin/ByteArray */)
|
|
||||||
-1
@@ -1,7 +1,6 @@
|
|||||||
// DONT_TARGET_EXACT_BACKEND: JVM
|
// DONT_TARGET_EXACT_BACKEND: JVM
|
||||||
// DONT_TARGET_EXACT_BACKEND: JS
|
// DONT_TARGET_EXACT_BACKEND: JS
|
||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// JVM_ABI_K1_K2_DIFF: KT-63899
|
|
||||||
|
|
||||||
// MODULE: lib
|
// MODULE: lib
|
||||||
// FILE: lib.kt
|
// FILE: lib.kt
|
||||||
|
|||||||
Reference in New Issue
Block a user