Would it be possible to change the flags of genera...
# compiler
t
Would it be possible to change the flags of generated multifile class parts so they have
Elements.Origin.MANDATED
or
EXPLICIT
like the generated synthetic methods with
$annotations
suffix? That would make it possible to process annotations on top-level properties and type aliases in files with
@JvmMultifileClass
annotation. In order to process annotations on properties or type aliases you need to get ahold of the
propertyName$annotations()V
method but for multifile class parts this element is in the synthetic
FacadeNameKt__FileNameKt
class. Since the class is synthetic it is never loaded by the annotation processor and can not be accessed, even if you know the name from parsing the facade class'
@Metadata
annotation
u
I’d prefer moving the
$annotations
methods to the facade since that’s where they should be semantically. (However, I think we can only do that in 1.5.)
t
Either way will work for me. In fact that would make it even easier
u
Could you please report an issue at https://kotl.in/issue? I'll take a look
t