Possible lazyweb but I wasn't able to find anythin...
# compiler
z
Possible lazyweb but I wasn't able to find anything in the channel history. When calling an IrFunction that has a default implementation, is there a JvmDefault/DefaultImpls-friendly way to do this in existing irCall code? I assume there must be to simplify platform-specific code too but I'm struggling to find one
s
The compiler plugin is applied before DefaultImpls are computed, so it should transform automatically
z
hmm, I'm not finding that to be the case when I run this in a test. The resulting code that attempts to invoke a function with a default results in an AbstractMethodError unless I add
-Xjvm-default=all
y
I would've thought that it would've just worked If you want to investigate, you could inspect the IR of a call to a default function and try to recreate it.
z
is there a tool like PSI explorer for IR?
y
There's one for FIR but to my knowledge none for IR. I'm thinking something as simple as compiling an example of it, and dumping the IR from your plugin (there's dumping functions that print out the IR in a somewhat-readable format). You could also set a breakpoint and explore the structure (that was the way I used to explore IR the most).