Fix local anonymous class name error in K2MetadataCompiler
Extract the logic of approximating to denotable class supertype from JS/KLIB and use it in metadata compiler. ^KT-20996 In Progress
This commit is contained in:
+12
@@ -725,6 +725,18 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
loadClassFile("SourceKt", tmpdir, library)
|
||||
}
|
||||
|
||||
fun testAnonymousObjectTypeMetadata() {
|
||||
val library = compileCommonLibrary(
|
||||
libraryName = "library",
|
||||
)
|
||||
compileKotlin(
|
||||
"anonymousObjectTypeMetadata.kt",
|
||||
tmpdir,
|
||||
listOf(library),
|
||||
K2MetadataCompiler(),
|
||||
)
|
||||
}
|
||||
|
||||
private fun loadClassFile(className: String, dir: File, library: File) {
|
||||
val classLoader = URLClassLoader(arrayOf(dir.toURI().toURL(), library.toURI().toURL()))
|
||||
val mainClass = classLoader.loadClass(className)
|
||||
|
||||
Reference in New Issue
Block a user