From ac9ac6f357b85c1be455a2068afe64e9a5219d2f Mon Sep 17 00:00:00 2001 From: "denis.linkov" Date: Mon, 1 Feb 2016 10:21:28 +0300 Subject: [PATCH] Fix compilation for kotlin dev_213 --- src/swot/Compiler.kt | 2 +- test/swot/SwotTest.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/swot/Compiler.kt b/src/swot/Compiler.kt index 138eaad632..35dbf91cbf 100644 --- a/src/swot/Compiler.kt +++ b/src/swot/Compiler.kt @@ -15,7 +15,7 @@ fun main(args: Array) { val root = File("lib/domains") root.walkTopDown().forEach { if (it.isFile) { - val parts = it.relativeTo(root).replace('\\', '/').removeSuffix(".txt").split('/').toList() + val parts = it.toRelativeString(root).replace('\\', '/').removeSuffix(".txt").split('/').toList() if (!checkSet(CompilationState.blacklist, parts) && !checkSet(CompilationState.domains, parts)) { CompilationState.domains.add(parts.reversed().joinToString(".")) } diff --git a/test/swot/SwotTest.kt b/test/swot/SwotTest.kt index 563e2ee638..8585575832 100644 --- a/test/swot/SwotTest.kt +++ b/test/swot/SwotTest.kt @@ -1,7 +1,6 @@ package swot -import kotlin.test.* -import junit.framework.* +import junit.framework.TestCase class SwotTest : TestCase() { fun testSwot() {