Kotlin: Small code simplification

This commit is contained in:
Ian Lynagh
2022-10-20 12:29:48 +01:00
parent 74a4061508
commit 291330c7e1

View File

@@ -16,9 +16,8 @@ class LinesOfCode(
val tw: FileTrapWriter,
val file: IrFile
) {
val psi2Ir = getPsi2Ir(logger)
init {
if (psi2Ir == null) {
val psi2Ir = getPsi2Ir(logger).also {
if (it == null) {
logger.warn("Lines of code will not be populated as Kotlin version is too old (${KotlinCompilerVersion.getVersion()})")
}
}