Packages and file facades are not yet supported in Kotlin reflection

This topic’s been discussed before, but there’s been no new movements in any of the other threads for several years, and none of them are ‘pure’ discussions of the language limitation itself.

I have a need to access top-level declarations in a Kotlin file through reflection (classes ending in Kt). I.e.:

package example

val foo = listOf<String>()

For my use case, I need to obtain a KType of foo as I need access to the generic parameters, something that’s not well-supported by native Java reflection.

However, this functionality is not available (as of Kotlin 1.3.41), failing with the error Packages and file facades are not yet supported in Kotlin reflection.

Is this feature still on the language roadmap? Is there a ticket I can subscribe to for notifications when this becomes available?

https://youtrack.jetbrains.com/issue/KT-16479