Karim Houari
11/29/2022, 12:03 PMIrGenerationExtension
and can see the generated .class file as a result. I then created a .kt file which references that class, but when trying to compile with kotlinc (the .class file is on the classpath with -cp
) I get unresolved reference
. I opened the .class file in a decompiler and when comparing it to a .class file that was created from a .kt file, I see my generated .class file has missing d1
and d2
metadata properties, plus k = 3
, whereas the other class has k = 1
. Does this matter? Is there any other reason why this might not be working?Big Chungus
11/29/2022, 12:21 PMKarim Houari
11/29/2022, 12:25 PMclass Foo {
val abc = "abc"
fun hello() = "Hello World"
}
and generate a new class with just the hello
function?
class Bar {
fun hello(name: String) = "Hello World"
}
My understanding was ksp does not have the details of function bodiesBig Chungus
11/29/2022, 12:39 PMBig Chungus
11/29/2022, 12:39 PMKarim Houari
11/29/2022, 12:42 PMBig Chungus
11/29/2022, 12:43 PMBig Chungus
11/29/2022, 12:44 PMdmitriy.novozhilov
11/29/2022, 12:45 PMBig Chungus
11/29/2022, 12:45 PMKarim Houari
11/29/2022, 12:46 PMJohannes Barop
11/30/2022, 10:11 AMSyntheticResolveExtension
. The IrGenerationExtension
implementation then only adds the bodies.
BTW: You can reference the SyntheticResolveExtension
implementation in an IntelliJ plugin and then Inntelij will also know about the generated classes.