ForteScarlet / kotlin-suspend-transform-compiler-plugin

A Kotlin compiler plugin for transforming suspend functions to platform-compatible non-suspend functions, such as the JVM Blocking API and CompletableFuture 🐱
MIT License
33 stars 3 forks source link

Remove duplicate of IR nodes inside the body #39

Closed JSMonk closed 8 months ago

JSMonk commented 8 months ago

I found the problem you had with the local lambda creation. You used +expr, so, every node was added at least twice, and while the KLIB deserializer tried to create a function, it meat two variants of function that refer to the same symbol (this is an illegal state of the IR in Kotlin). I've fixed all the things, so it compiles both for JVM and JS

ForteScarlet commented 8 months ago

Wow! Awesome! Thank you, I'll try again from my local and get back to you with a reply from YouTrack!