Skip to content

Commit a50d804

Browse files
committed
Kotlin: Remove a use of ObsoleteDescriptorBasedAPI
This isn't supported in Kotlin 2 mode, but removing this code doesn't affect any tests.
1 parent 656b4fc commit a50d804

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,21 +157,10 @@ open class KotlinFileExtractor(
157157
else -> false
158158
}
159159

160-
@OptIn(ObsoleteDescriptorBasedAPI::class)
161160
private fun isFake(d: IrDeclarationWithVisibility): Boolean {
162161
val hasFakeVisibility = d.visibility.let { it is DelegatedDescriptorVisibility && it.delegate == Visibilities.InvisibleFake } || d.isFakeOverride
163162
if (hasFakeVisibility && !isJavaBinaryObjectMethodRedeclaration(d))
164163
return true
165-
try {
166-
if ((d as? IrFunction)?.descriptor?.isHiddenToOvercomeSignatureClash == true) {
167-
return true
168-
}
169-
}
170-
catch (e: NotImplementedError) {
171-
// `org.jetbrains.kotlin.ir.descriptors.IrBasedClassConstructorDescriptor.isHiddenToOvercomeSignatureClash` throws the exception
172-
logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
173-
return false
174-
}
175164
return false
176165
}
177166

0 commit comments

Comments
 (0)