Kotlin: don't try to call nonexistent j.l.Number.toChar

Previously we thought this could be callable because Kotlin's view of `j.l.Integer` inherits `k.Number` which defines `toChar`.
This commit is contained in:
Chris Smowton
2022-10-25 17:09:05 +01:00
parent 3d025ea77e
commit 004f4be5fb
5 changed files with 8 additions and 0 deletions

View File

@@ -1281,6 +1281,7 @@ open class KotlinUsesExtractor(
}
// Look for an exact type match...
javaClass.declarations.findSubType<IrFunction> { decl ->
!decl.isFakeOverride &&
decl.name.asString() == jvmName &&
decl.valueParameters.size == f.valueParameters.size &&
decl.valueParameters.zip(f.valueParameters).all { p -> erase(p.first.type).classifierOrNull == erase(p.second.type).classifierOrNull }