Psi2ir: do not generate init block body in kapt mode

This commit is contained in:
Alexander Udalov
2022-06-01 23:03:17 +02:00
parent 7e9d7c895a
commit 448cba07bb
5 changed files with 35 additions and 4 deletions
@@ -79,6 +79,11 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi
runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt");
}
@TestMetadata("anonymousInitializer.kt")
public void testAnonymousInitializer() throws Exception {
runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousInitializer.kt");
}
@TestMetadata("comments.kt")
public void testComments() throws Exception {
runTest("plugins/kapt3/kapt3-compiler/testData/converter/comments.kt");
@@ -80,6 +80,11 @@ public class IrClassFileToSourceStubConverterTestGenerated extends AbstractIrCla
runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt");
}
@TestMetadata("anonymousInitializer.kt")
public void testAnonymousInitializer() throws Exception {
runTest("plugins/kapt3/kapt3-compiler/testData/converter/anonymousInitializer.kt");
}
@TestMetadata("comments.kt")
public void testComments() throws Exception {
runTest("plugins/kapt3/kapt3-compiler/testData/converter/comments.kt");
@@ -0,0 +1,7 @@
class C {
fun f() {}
init {
f()
}
}
@@ -0,0 +1,12 @@
import java.lang.System;
@kotlin.Metadata()
public final class C {
public C() {
super();
}
public final void f() {
}
}