From 62f7f010b89a21991ea9b6d5eada39381200ad04 Mon Sep 17 00:00:00 2001 From: Vasily Levchenko Date: Mon, 9 Mar 2020 18:08:51 +0100 Subject: [PATCH] [build][workaround] for issue with function reference --- .../main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt | 6 +++--- build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt b/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt index 43c048bf70e..ef3e296221a 100644 --- a/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt +++ b/build-tools/src/main/kotlin/org/jetbrains/kotlin/KotlinNativeTest.kt @@ -152,7 +152,7 @@ open class KonanGTest : KonanTest() { override fun run() { doBeforeRun?.execute(this) runProcess( - executor = project.executor::execute, + executor = {project.executor.execute(it)}, executable = executable, args = arguments ).run { @@ -245,9 +245,9 @@ open class KonanLocalTest : KonanTest() { for (i in 1..times) { val args = arguments + (multiArguments?.get(i - 1) ?: emptyList()) output += if (testData != null) - runProcessWithInput(project.executor::execute, executable, args, testData!!) + runProcessWithInput({project.executor.execute(it)}, executable, args, testData!!) else - runProcess(project.executor::execute, executable, args) + runProcess({project.executor.execute(it)}, executable, args) } if (compilerMessages) { // TODO: as for now it captures output only in the driver task. diff --git a/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt b/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt index 30d46891f01..b4d4075be8e 100644 --- a/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt +++ b/build-tools/src/main/kotlin/org/jetbrains/kotlin/Utils.kt @@ -84,7 +84,7 @@ fun Project.getFilesToCompile(compile: List, exclude: List): Lis project.file(f) .walk() .filter { it.isFile && it.name.endsWith(".kt") && !excludeFiles.contains(it.absolutePath) } - .map(File::getAbsolutePath) + .map{ it.absolutePath } .asIterable() } }