milis92 / Krang

Kotlin Compiler Plugin that gives you the ability to be notified every time annotated function is called
Apache License 2.0
35 stars 1 forks source link

Intercepting Enum classes will break project compilation #36

Closed milis92 closed 1 year ago

milis92 commented 1 year ago

Projects with any kind of Enum class with break project compilation with:

java.lang.IllegalStateException: Synthetic body contains no statements: IrSyntheticBodyImpl(ENUM_VALUES)

Thrown at this line:

https://github.com/milis92/Krang/blob/c02f0b767ea1d6c588ac176de0a93e34463ac56f/krang-compiler-plugin/src/main/kotlin/com/herman/krang/internal/transformers/KrangFunctionBodyTransformer.kt#L59