I’ve just stumbled upon a small example project https://github.com/damianpetla/kotlin-dagger-example, which shows a working example of annotation processing in Kotlin!
But I still can’t find the answer, why does it work? The generated code is valid. Other libraries use the same tecnique, but it seems, they don’t even dive into Kotlin code.
But Dagger 2 works. How?
I’d really want to write some codegeneration tools