Skip to content

Commit 910a1f8

Browse files
committed
Adjust opt-in required to use string-manipulation functions in Kotlin <= 1.5
1 parent 540a2a6 commit 910a1f8

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ open class KotlinUsesExtractor(
6767
TypeResult(fakeKotlinType(), "", "")
6868
)
6969

70-
@OptIn(kotlin.ExperimentalStdlibApi::class) // Annotation required by kotlin versions < 1.5
7170
fun extractFileClass(f: IrFile): Label<out DbClass> {
7271
val pkg = f.fqName.asString()
7372
val jvmName = getFileClassName(f)

java/kotlin-extractor/src/main/kotlin/utils/ClassNames.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.load.kotlin.JvmPackagePartSource
2222
// for `that`.
2323
private fun getName(d: IrDeclarationWithName) = (d as? IrAnnotationContainer)?.let { getJvmName(it) } ?: d.name.asString()
2424

25+
@OptIn(ExperimentalStdlibApi::class) // Annotation required by kotlin versions < 1.5
2526
fun getFileClassName(f: IrFile) =
2627
getJvmName(f) ?:
2728
((f.fileEntry.name.replaceFirst(Regex(""".*[/\\]"""), "")

0 commit comments

Comments
 (0)