https://kotlinlang.org logo
#ksp
Title
# ksp
r

Rafael Costa

03/07/2024, 1:40 PM
Hi again 👋 I would like to have my users be able to do
Copy code
typealias SomeName = SomeAnnotation
Such that when I do
Resolver.getSymbolsWithAnnotation("package.name.SomeAnnotation")
I would also get symbols annotated with
SomeName
. Or I am open to doing something else on my side to have symbols annotated by a typealias to be considered of course 🙂 Is there a way to do this? I can't seem to make it work..
j

Jiaxiang

03/07/2024, 10:08 PM
You should be able to do it the other way around, putting the type alias into the argument of
getSymbolsWithAnnotation()
r

Rafael Costa

03/08/2024, 3:58 PM
But if I don't know about the typealias because it was created by the user of my library, on their module, I wouldn't know what to pass to that function 🤔 I do also have a case where I could include a typealias in the library, but that also doesn't seem to work. It seems like
getSymbolsWithAnnotation
returns empty sequence for typealiases.
2 Views