I'm using FIR to parse some files and would like t...
# compiler
j
I'm using FIR to parse some files and would like to try and determine if a parameter's type is itself marked as
@Serializable
or not. I'm not quite sure how to make the jump to see its annotations. I have a ConeClassLikeType and a FirResolvedTypeRef from the parameter, but i'm not sure how to then jump to the real type on which annotations could be read. I tried looking how the serializable plugin does this but couldn't locate the corresponding code.
d
You need to extract lookupTag from cone type and then call toSymbol(session) on it It will return the classifier (class, object or type parameter) associated with this type, from which you can access annotations and other attributes of declaration
j
Ah yes,
toSymbol
was the missing piece. Thank you!
👌 1