[FIR] Use ConeKotlinType to represent vararg's element type

We are using `ConeKotlinType` instead of `FirTypeRef` to represent
that element type of vararg doesn't have any source. It has a type
that was inferred. If we try to specify a source, then we could
end up with the incorrect place for diagnostic.

#KT-59682 Fixed
This commit is contained in:
Ivan Kylchik
2023-12-25 16:49:55 +01:00
committed by Space Team
parent a4a433fd65
commit aecf05c4ac
14 changed files with 33 additions and 29 deletions
@@ -222,9 +222,7 @@ private fun List<JavaAnnotationArgument>.mapJavaTargetArguments(session: FirSess
ConeAttributes.Empty
)
coneTypeOrNull = elementConeType
varargElementType = buildResolvedTypeRef {
type = elementConeType.createOutArrayType()
}
coneElementTypeOrNull = elementConeType.createOutArrayType()
}
}