Introduce fictitious numbered Function class descriptors
This commit is contained in:
@@ -91,7 +91,7 @@ public class OuterClassGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testLocalObjectInInlineFunction() throws Exception {
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/Foo", "inlineFoo", "(Lkotlin/Function0;)V");
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/Foo", "inlineFoo", "(Lkotlin/jvm/functions/Function0;)V");
|
||||
doCustomTest("foo/Foo\\$inlineFoo\\$localObject\\$1", expectedInfo, "inlineObject");
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class OuterClassGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testLambdaInInlineFunction() throws Exception {
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/Foo", "inlineFoo", "(Lkotlin/Function0;)V");
|
||||
OuterClassInfo expectedInfo = new OuterClassInfo("foo/Foo", "inlineFoo", "(Lkotlin/jvm/functions/Function0;)V");
|
||||
doCustomTest("foo/Foo\\$inlineFoo\\$1", expectedInfo, "inlineLambda");
|
||||
}
|
||||
|
||||
|
||||
+7
-5
@@ -20,6 +20,7 @@ import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.builtins.createBuiltInPackageFragmentProvider
|
||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
|
||||
import org.jetbrains.kotlin.jvm.compiler.LoadDescriptorUtil.TEST_PACKAGE_FQNAME
|
||||
import org.jetbrains.kotlin.serialization.deserialization.ClassDescriptorFactory
|
||||
import org.jetbrains.kotlin.storage.LockBasedStorageManager
|
||||
import org.jetbrains.kotlin.test.JetTestUtils
|
||||
import org.jetbrains.kotlin.test.TestCaseWithTmpdir
|
||||
@@ -39,11 +40,12 @@ public class BuiltInsSerializerTest : TestCaseWithTmpdir() {
|
||||
|
||||
val module = JetTestUtils.createEmptyModule("<module>")
|
||||
|
||||
val packageFragmentProvider =
|
||||
createBuiltInPackageFragmentProvider(LockBasedStorageManager(), module, setOf(TEST_PACKAGE_FQNAME)) {
|
||||
val file = File(tmpdir, it)
|
||||
if (file.exists()) FileInputStream(file) else null
|
||||
}
|
||||
val packageFragmentProvider = createBuiltInPackageFragmentProvider(
|
||||
LockBasedStorageManager(), module, setOf(TEST_PACKAGE_FQNAME), ClassDescriptorFactory.EMPTY
|
||||
) {
|
||||
val file = File(tmpdir, it)
|
||||
if (file.exists()) FileInputStream(file) else null
|
||||
}
|
||||
|
||||
module.initialize(packageFragmentProvider)
|
||||
module.addDependencyOnModule(module)
|
||||
|
||||
Reference in New Issue
Block a user