[klibs] Fixed a bug in the signature-to-descriptor searcher
#KT-51927 Fixed
This commit is contained in:
+1
-1
@@ -151,7 +151,7 @@ class DescriptorByIdSignatureFinderImpl(
|
|||||||
}
|
}
|
||||||
val candidates = acc
|
val candidates = acc
|
||||||
|
|
||||||
return candidates.singleOrNull() ?: findDescriptorByHash(candidates, signature.id)
|
return findDescriptorByHash(candidates, signature.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun findDescriptorByHash(candidates: Collection<DeclarationDescriptor>, id: Long?): DeclarationDescriptor? =
|
private fun findDescriptorByHash(candidates: Collection<DeclarationDescriptor>, id: Long?): DeclarationDescriptor? =
|
||||||
|
|||||||
@@ -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"
|
||||||
|
}
|
||||||
+6
@@ -34936,6 +34936,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
runTest("compiler/testData/codegen/box/regressions/kt5056.kt");
|
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
|
@Test
|
||||||
@TestMetadata("kt5395.kt")
|
@TestMetadata("kt5395.kt")
|
||||||
public void testKt5395() throws Exception {
|
public void testKt5395() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user