Fix compilation.

- rename isFinal extension property to avoid ambiguity with synthetic property in DeserializedClassTypeConstructor
- add explicit parameter to lambda File.listFiles
- return true from lambda Query.forEach
This commit is contained in:
Stanislav Erokhin
2015-12-18 18:54:37 +03:00
parent 1574dc78df
commit bcaa755c4e
16 changed files with 21 additions and 19 deletions
@@ -36,7 +36,7 @@ public class CompilerSmokeTest {
private val javaExecutable = File( File(System.getProperty("java.home"), "bin"), "java")
private val embeddableJar = File(".").listFiles { it.name.startsWith("kotlin-compiler-embeddable", ignoreCase = true) && it.name.endsWith(".jar", ignoreCase = true) }?.firstOrNull()
private val embeddableJar = File(".").listFiles { it -> it.name.startsWith("kotlin-compiler-embeddable", ignoreCase = true) && it.name.endsWith(".jar", ignoreCase = true) }?.firstOrNull()
?: throw FileNotFoundException("cannot find kotlin-compiler-embeddable*.jar in the directory " + File(".").absolutePath)
@Test
@@ -62,7 +62,7 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractCo
afterCompileHook(args)
}
private fun getKotlinSources(): List<File> = getSource().filter { it.isKotlinFile() }
private fun getKotlinSources(): List<File> = (getSource() as Iterable<File>).filter { it.isKotlinFile() }
private fun File.isKotlinFile(): Boolean {
return when (FilenameUtils.getExtension(getName()).toLowerCase()) {
@@ -158,7 +158,7 @@ public open class KotlinCompile() : AbstractKotlinCompile<K2JVMCompilerArguments
testsMap.get(this.name)?.let {
addFriendPathForTestTask(it)
}
9
getLogger().kotlinDebug("args.moduleName = ${args.moduleName}")
}