having trouble figuring out how to replace a gener...
# ksp
e
having trouble figuring out how to replace a generic type param with a specific type. You can use
Copy code
type.replace()
but you need a
KSTypeArgument
. and you can get a type argument from
Copy code
resolver.getTypeArgument()
but you need a type reference. But I don't know how to get a type reference. You can do
Copy code
resolver.getClassDeclarationByName("name").asType()
but that returns a
KSType
not a
KSTypeRefence
.
t
@Jiaxiang can you share the progress?
j
we are going to add a util function to enable you to create a pseudo type reference from a type
e
👍 that would work