Open
Description
Describe the bug
Consider the following function
interface Factory
fun doSomething(factories: Set<@JvmSuppressWildcards Factory>) {
}
// or
fun doSomething(factories: @JvmSuppressWildcards Set<Factory>) {
}
And later in the processor
// Where functionDeclaration is the doSomething function decleration
functionDeclaration.parameters.map(KSValueParameter::toParameterSpec)
fun KSValueParameter.toParameterSpec(): ParameterSpec {
return ParameterSpec.builder(
name = name?.asString().orEmpty(),
type = type.toTypeName(),
).build()
}
Produced ParameterSpec will lose the annotations applied to the original function.
Expected behavior
I would expect the KSTypeReference.toTypeName to preserve annotations applied to function parameters and TypeArguments if any.