mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Kotlin: Small code simplification
This commit is contained in:
@@ -16,9 +16,8 @@ class LinesOfCode(
|
|||||||
val tw: FileTrapWriter,
|
val tw: FileTrapWriter,
|
||||||
val file: IrFile
|
val file: IrFile
|
||||||
) {
|
) {
|
||||||
val psi2Ir = getPsi2Ir(logger)
|
val psi2Ir = getPsi2Ir(logger).also {
|
||||||
init {
|
if (it == null) {
|
||||||
if (psi2Ir == null) {
|
|
||||||
logger.warn("Lines of code will not be populated as Kotlin version is too old (${KotlinCompilerVersion.getVersion()})")
|
logger.warn("Lines of code will not be populated as Kotlin version is too old (${KotlinCompilerVersion.getVersion()})")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user