Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ef59501

Browse files
committed
Kotlin: Broaden isFake
1 parent aee74dd commit ef59501

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,14 @@ open class KotlinFileExtractor(
8282
}
8383

8484
private fun isFake(d: IrDeclarationWithVisibility): Boolean {
85-
return d.isFakeOverride
85+
val visibility = d.visibility
86+
if (visibility is DelegatedDescriptorVisibility && visibility.delegate == Visibilities.InvisibleFake) {
87+
return true
88+
}
89+
if (d.isFakeOverride) {
90+
return true
91+
}
92+
return false
8693
}
8794

8895
fun extractDeclaration(declaration: IrDeclaration) {

0 commit comments

Comments
 (0)