Skip to content

Commit 1998e29

Browse files
committed
Kotlin 2: isFake is currently broken, so assume not fake for now
We'll want to find a Kotlin-2-compatible replacement for this.
1 parent 6bd2695 commit 1998e29

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ open class KotlinFileExtractor(
8080
globalExtensionState: KotlinExtractorGlobalState,
8181
): KotlinUsesExtractor(logger, tw, dependencyCollector, externalClassExtractor, primitiveTypeMapping, pluginContext, globalExtensionState) {
8282

83+
val usesK2 = usesK2(pluginContext)
8384
val metaAnnotationSupport = MetaAnnotationSupport(logger, pluginContext, this)
8485

8586
private inline fun <T> with(kind: String, element: IrElement, f: () -> T): T {
@@ -172,7 +173,10 @@ open class KotlinFileExtractor(
172173
}
173174
catch (e: NotImplementedError) {
174175
// `org.jetbrains.kotlin.ir.descriptors.IrBasedClassConstructorDescriptor.isHiddenToOvercomeSignatureClash` throws the exception
175-
logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
176+
// TODO: We need a replacement for this for Kotlin 2
177+
if (!usesK2) {
178+
logger.warnElement("Couldn't query if element is fake, deciding it's not.", d, e)
179+
}
176180
return false
177181
}
178182
}

0 commit comments

Comments
 (0)