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
shikasd
11/17/2024, 4:55 AM
The compiler plugin is applied before DefaultImpls are computed, so it should transform automatically
z
Zac Sweers
11/17/2024, 6:22 AM
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
Youssef Shoaib [MOD]
11/17/2024, 9:10 PM
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
Zac Sweers
11/17/2024, 9:40 PM
is there a tool like PSI explorer for IR?
y
Youssef Shoaib [MOD]
11/17/2024, 9:47 PM
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).