I'm developing compiler plugin, and am looking for...
# compiler
s
I'm developing compiler plugin, and am looking for some input on resolving the arguments to type parameters in the IR stage. Suppose I have classes •
class A : B
class B : C<MyImpl>
class <T : MyIF> C
where
MyImpl : MyIf
. Does the compiler expose some functionality available in the IR stage to resolve
T
to
MyImpl
when processing IrClass
A
? A lot of functionality (as expected) resolves to
MyIF
, but I can't find any functionalitity to resolve
T
to
MyImpl
while browsing the Kotlin compiler source-code.
d
I don't recall such an utility at IR level, but you could implement it similarly to the forEachSupertypeWithInheritor in the FIR.
s
I was afraid I would have do it myself. Thanks for the quick reply and example 🙂