Skip to content

Commit

Permalink
change the modifiers to private from public and lift return out of 'i…
Browse files Browse the repository at this point in the history
…f' (#1088)
  • Loading branch information
Taeyang Jin (Heli) committed Sep 9, 2022
1 parent 5a19640 commit b1d1f6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/src/main/kotlin/com/google/devtools/ksp/utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ fun KSDeclaration.isPrivate() = this.modifiers.contains(Modifier.PRIVATE)
fun KSDeclaration.isJavaPackagePrivate() = this.getVisibility() == Visibility.JAVA_PACKAGE

fun KSDeclaration.closestClassDeclaration(): KSClassDeclaration? {
if (this is KSClassDeclaration) {
return this
return if (this is KSClassDeclaration) {
this
} else {
return this.parentDeclaration?.closestClassDeclaration()
this.parentDeclaration?.closestClassDeclaration()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import com.google.devtools.ksp.symbol.KSNode

class CommandLineKSPLogger : KSPLogger {
// TODO: support logging level.
val messager = System.err
private val messager = System.err
override fun logging(message: String, symbol: KSNode?) {
messager.println(message)
}
Expand Down

0 comments on commit b1d1f6c

Please sign in to comment.