diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveUtils.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveUtils.kt index 00e73c437f4..297301d56e1 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveUtils.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveUtils.kt @@ -44,8 +44,9 @@ internal fun remapArgumentsWithVararg( var indexAfterVarargs = argumentList.size val newArgumentMapping = linkedMapOf() val varargArgument = buildVarargArgumentsExpression { - this.varargElementType = varargParameterTypeRef.withReplacedConeType(varargElementType) - this.typeRef = varargParameterTypeRef.withReplacedConeType(varargArrayType) + //todo ideally we should use here a source from the use-site and not from the declaration-site + this.varargElementType = varargParameterTypeRef.withReplacedConeType(varargElementType, KtFakeSourceElementKind.VarargArgument) + this.typeRef = varargParameterTypeRef.withReplacedConeType(varargArrayType, KtFakeSourceElementKind.VarargArgument) for ((i, arg) in argumentList.withIndex()) { val valueParameter = argumentMapping.getValue(arg) // Collect arguments if `arg` is a vararg argument of interest or other vararg arguments. diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt index c15afedc409..e522843bead 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt @@ -36,7 +36,7 @@ fun takeUInt(@ImplicitIntegerCoercion u: UInt) {} fun takeULong(@ImplicitIntegerCoercion u: ULong) {} @ExperimentalUnsignedTypes -fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) {} +fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) {} fun takeLong(@ImplicitIntegerCoercion l: Long) {}