Kotlin: Catch exception thrown by kotlinc

This commit is contained in:
Tamas Vajk
2022-09-08 14:09:18 +02:00
parent ac307137ad
commit 824ba6ed2a
2 changed files with 13 additions and 6 deletions

View File

@@ -97,8 +97,15 @@ open class KotlinFileExtractor(
if (d.isFakeOverride) {
return true
}
if ((d as? IrFunction)?.descriptor?.isHiddenToOvercomeSignatureClash == true) {
return true
try {
if ((d as? IrFunction)?.descriptor?.isHiddenToOvercomeSignatureClash == true) {
return true
}
}
catch (e: NotImplementedError) {
// `org.jetbrains.kotlin.ir.descriptors.IrBasedClassConstructorDescriptor.isHiddenToOvercomeSignatureClash` throws the exception
logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
return false
}
return false
}