Damn, according to the docs (<https://github.com/J...
# compiler
d
Damn, according to the docs (https://github.com/JetBrains/kotlin/blob/master/docs/fir/fir-plugins.md#other-extensions), I would have to wait for a stable extension point to implement what I'd like to. However, I see that the Compose plugin uses some
InternalNonStableExtensionPoints
, namely
TypeResolutionIntercepterExtension
and
CallResolutionInterceptorExtension
. My use-case is the following: I would like to rewrite some calls to a library-defined
fun <T> quote(t: T): FirExpression = TODO()
function. That library would itself depend on
kotlin-compiler-embeddable
. As I see it, I would have to: 1. Participate early to the type resolution, and for each call to
quote
set its resolved type of
o.j.k.f.e.FirExpression
2. At some point after BODY_RESOLVE, recursively visit the expression argument to
quote
and generate fir builder calls for each FIR node. Does this make sense? Do you think it is feasible? Again thanks for any of your help!