[klibs] Fixed a bug in the signature-to-descriptor searcher

#KT-51927 Fixed
This commit is contained in:
Igor Chevdar
2022-04-12 10:54:33 +05:00
committed by Space
parent 57b9648041
commit 231fe42c0a
3 changed files with 22 additions and 1 deletions
@@ -151,7 +151,7 @@ class DescriptorByIdSignatureFinderImpl(
}
val candidates = acc
return candidates.singleOrNull() ?: findDescriptorByHash(candidates, signature.id)
return findDescriptorByHash(candidates, signature.id)
}
private fun findDescriptorByHash(candidates: Collection<DeclarationDescriptor>, id: Long?): DeclarationDescriptor? =
+15
View File
@@ -0,0 +1,15 @@
// TARGET_BACKEND: NATIVE
// MODULE: inner
// FILE: Foo.kt
class Foo(parameter: String)
// MODULE: outer(inner)
// FILE: FooFactory.kt
fun Foo(): Foo = Foo("")
// MODULE: main(inner, outer)
// FILE: box.kt
fun box(): String {
Foo()
return "OK"
}
@@ -34936,6 +34936,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/regressions/kt5056.kt");
}
@Test
@TestMetadata("kt51927.kt")
public void testKt51927() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt51927.kt");
}
@Test
@TestMetadata("kt5395.kt")
public void testKt5395() throws Exception {