Skip to content

Commit

Permalink
Merge pull request #17769 from igfoo/igfoo/2.1.0-beta2
Browse files Browse the repository at this point in the history
Kotlin: Fix for 2.1.0-Beta2
  • Loading branch information
igfoo authored Oct 15, 2024
2 parents bdec751 + b5bfd06 commit 196baa9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,17 @@ open class KotlinFileExtractor(
}

private fun FunctionDescriptor.tryIsHiddenToOvercomeSignatureClash(d: IrFunction): Boolean {
// `org.jetbrains.kotlin.ir.descriptors.IrBasedClassConstructorDescriptor.isHiddenToOvercomeSignatureClash`
// throws one exception or other in Kotlin 2, depending on the version.
// TODO: We need a replacement for this for Kotlin 2
try {
return this.isHiddenToOvercomeSignatureClash
} catch (e: NotImplementedError) {
// `org.jetbrains.kotlin.ir.descriptors.IrBasedClassConstructorDescriptor.isHiddenToOvercomeSignatureClash` throws the exception
// TODO: We need a replacement for this for Kotlin 2
if (!usesK2) {
logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
}
return false
} catch (e: IllegalStateException) {
if (!usesK2) {
logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
}
Expand Down

0 comments on commit 196baa9

Please sign in to comment.