Skip to content

Commit a517279

Browse files
committed
Code quality improvements
1 parent 90b28f0 commit a517279

File tree

3 files changed

+1
-20
lines changed

3 files changed

+1
-20
lines changed

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1914,13 +1914,6 @@ open class KotlinFileExtractor(
19141914
unaryopReceiver(id, c.dispatchReceiver, "Dispatch receiver")
19151915
}
19161916

1917-
/**
1918-
* Populate the lhs of a binary op from this call's extension receiver, and the rhs from its sole argument.
1919-
*/
1920-
fun binopExtensionMethod(id: Label<out DbExpr>) {
1921-
binopReceiver(id, c.extensionReceiver, "Extension receiver")
1922-
}
1923-
19241917
val dr = c.dispatchReceiver
19251918
when {
19261919
isFunction(target, "kotlin", "String", "plus", false) -> {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ open class KotlinUsesExtractor(
12901290
else null
12911291
} ?: run {
12921292
val parentFqName = parentClass.fqNameWhenAvailable?.asString()
1293-
val msg = "Couldn't find a Java equivalent function to $parentFqName.${f.name} in ${javaClass.fqNameWhenAvailable}"
1293+
val msg = "Couldn't find a Java equivalent function to $parentFqName.${f.name.asString()} in ${javaClass.fqNameWhenAvailable?.asString()}"
12941294
if (!globalExtensionState.deduplicatedWarnings.contains(msg)) {
12951295
logger.warn(msg)
12961296
globalExtensionState.deduplicatedWarnings.add(msg)

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,3 @@ inline fun <reified S: IrDeclaration> Iterable<IrDeclaration>.findSubType(
1212
): S? {
1313
return this.find { it is S && predicate(it) } as S?
1414
}
15-
16-
/**
17-
* This behaves the same as Iterable<IrDeclaration>.singleOrNull, but
18-
* requires that the value found is of the subtype S, and it casts
19-
* the result for you appropriately.
20-
*/
21-
inline fun <reified S: IrDeclaration> Iterable<IrDeclaration>.singleOrNullSubType(
22-
predicate: (S) -> Boolean
23-
): S? {
24-
return this.singleOrNull { it is S && predicate(it) } as S?
25-
}
26-

0 commit comments

Comments
 (0)