With FIR that would be accessible from the IDE, one example is generating a function (with empty/no body) and later add the body in IR.
An example about this is what Kotlin Serialization does, when you finish to write the
@Serializable
annotation over a
Foo
class, you find in the IDE
Foo.serializer()
, if you comment the annotation, the function is not generated, so it "disappears".
FIR is not working in the latest EAP for third party plugins (not sure for JetBrains ones tho), so you must clone the IntelliJ Community repo, and execute the configuration
IDEA (K2 Kotlin)
. When the IDE is built and it is running, you must change this key,
kotlin.k2.only.bundled.compiler.plugins.enabled -> false
, in the Registry (you can find it by looking for
Registry
in the
Actions
tab from the dialog populated with shift + shift)