Skip to content

Commit b1d1f6c

Browse files
author
Taeyang Jin (Heli)
authored
change the modifiers to private from public and lift return out of 'if' (#1088)
1 parent 5a19640 commit b1d1f6c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

api/src/main/kotlin/com/google/devtools/ksp/utils.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ fun KSDeclaration.isPrivate() = this.modifiers.contains(Modifier.PRIVATE)
234234
fun KSDeclaration.isJavaPackagePrivate() = this.getVisibility() == Visibility.JAVA_PACKAGE
235235

236236
fun KSDeclaration.closestClassDeclaration(): KSClassDeclaration? {
237-
if (this is KSClassDeclaration) {
238-
return this
237+
return if (this is KSClassDeclaration) {
238+
this
239239
} else {
240-
return this.parentDeclaration?.closestClassDeclaration()
240+
this.parentDeclaration?.closestClassDeclaration()
241241
}
242242
}
243243

kotlin-analysis-api/src/main/kotlin/com/google/devtools/ksp/impl/CommandLineKSPLogger.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import com.google.devtools.ksp.symbol.KSNode
2222

2323
class CommandLineKSPLogger : KSPLogger {
2424
// TODO: support logging level.
25-
val messager = System.err
25+
private val messager = System.err
2626
override fun logging(message: String, symbol: KSNode?) {
2727
messager.println(message)
2828
}

0 commit comments

Comments
 (0)