Hey all 🙂
I’m new to Kotlin compiler plugins and hope this is the right place to ask.
I’m playing with the new IR compiler plugins. I created a simple test, that adds a function to an annotated class.
The function just calls
println("I'm here");
I can compile the class and when I try to use
kotlinc
to compile another class that calls the generated function, I get:
kotlinc -classpath . test.kt
test.kt:2:10: error: unresolved reference: generatedFunction
Main().generatedFunction()
But when I do the same with
javac
, everything is ok.
I can also run the class and I get the desired output
java Test
I'm here
Any pointers would be highly appreciated 🙂
p.s. Is there any documentation about writing compiler plugins with IR out there?