This message was deleted.
# compiler
s
This message was deleted.
y
Feel free to throw errors and such in IR. One of the easiest things you can do is write out the method body in actual Kotlin code, then mimic the IR it turns to
If you have the internal testing framework set up, then you can get IR dumps pretty easily. Otherwise, you can add it to some code you're compiling, and then debug your plugin and inspect that method in the debugger (probably a bit more accurate since it shows you the exact structure that your plugin receives and thus the structure it's meant to generate)
If you've used the compiler plugin template, then you already have the dumps set up. If not, then worst case scenario you can just
error(someIr.dump())
(
dump
is an extension function I believe, so your IDE should offer to import it once you type that in)