diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt index 61974812292..006de95a05d 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrTextTestCase.kt @@ -326,7 +326,7 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() { private val EXTERNAL_FILE_PATTERN = Regex("""// EXTERNAL_FILE""") private inline fun String.matchLinesWith(regex: Regex, ifMatched: (MatchResult) -> T): List = - split("\n").mapNotNull { regex.matchEntire(it)?.let(ifMatched) } + lines().mapNotNull { regex.matchEntire(it)?.let(ifMatched) } internal fun parseDumpExternalClasses(text: String) = text.matchLinesWith(DUMP_EXTERNAL_CLASS) { it.groupValues[1] }