Hi all! I'm really new with compilers / kotlin com...
# getting-started
b
Hi all! I'm really new with compilers / kotlin compiler plugin / JVM bytecode then probably this is a very newbie question: is it possible with kotlin compiler plugin generate a function bytecode changing its name? Example I have this function:
Copy code
@TestAnnotation("bar") fun foo() {}
And my plugin would change its bytecode to something like:
Copy code
fun foo_bar() {}
And by doing that, compiler would support many functions with the same name? like:
Copy code
@TestAnnotation("bar") fun foo() {}
@TestAnnotation("bar2") fun foo() {}
@TestAnnotation("bar3") fun foo() {}
d
Kotlin already has
@JvmName
which you can use. As for custom compiler plugins, they are possible, but the API is unofficial and not documented
👍 2