It makes it difficult to handle without a single interface to represent things that have annotations
jameskleeh
02/16/2022, 3:05 PM
They both have
val annotations: Sequence<KSAnnotation>
j
Jiaxiang
02/16/2022, 5:06 PM
KSAnnotated
is a subtype of
KSNode
while
KSType
is not.
j
jameskleeh
02/16/2022, 6:47 PM
I’m aware of that, however my suggestion is that it would be useful to have a contract for just “something that has annotations”
j
Jiaxiang
02/17/2022, 12:40 AM
I see your point, changing class structure might be breaking for binary compatibilities. Generally, annotations on `type`s are considered different from annotations on symbols, in most of the time it should be sufficient to read annotations from
KSTypeReference
directly, are you processing annotations on actual types rather than the type reference?
z
Zac Sweers
02/17/2022, 5:48 AM
yeah this was my thought as well - this seems like something for KSTypeReference