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

Original commit: bcaa755c4e
This commit is contained in:
Stanislav Erokhin
2015-12-18 18:54:37 +03:00
parent 2d6de9f95d
commit b5ce541bbf
2 changed files with 4 additions and 4 deletions
@@ -245,8 +245,8 @@ public abstract class AbstractIncrementalJpsTest(
return modifications
}
val haveFilesWithoutNumbers = testDataDir.listFiles { it.getName().matches(".+\\.($COMMANDS_AS_REGEX_PART)$".toRegex()) }?.isNotEmpty() ?: false
val haveFilesWithNumbers = testDataDir.listFiles { it.getName().matches(".+\\.($COMMANDS_AS_REGEX_PART)\\.\\d+$".toRegex()) }?.isNotEmpty() ?: false
val haveFilesWithoutNumbers = testDataDir.listFiles { it -> it.getName().matches(".+\\.($COMMANDS_AS_REGEX_PART)$".toRegex()) }?.isNotEmpty() ?: false
val haveFilesWithNumbers = testDataDir.listFiles { it -> it.getName().matches(".+\\.($COMMANDS_AS_REGEX_PART)\\.\\d+$".toRegex()) }?.isNotEmpty() ?: false
if (haveFilesWithoutNumbers && haveFilesWithNumbers) {
fail("Bad test data format: files ending with both unnumbered and numbered $COMMANDS_AS_MESSAGE_PART were found")
@@ -65,7 +65,7 @@ public abstract class AbstractProtoComparisonTest : UsefulTestCase() {
}
private fun compileFileAndGetClasses(testPath: String, testDir: File, prefix: String): List<File> {
val files = File(testPath).listFiles { it.name.startsWith(prefix) }!!
val files = File(testPath).listFiles { it -> it.name.startsWith(prefix) }!!
val sourcesDirectory = testDir.createSubDirectory("sources")
val classesDirectory = testDir.createSubDirectory("$prefix.src")
@@ -74,7 +74,7 @@ public abstract class AbstractProtoComparisonTest : UsefulTestCase() {
}
MockLibraryUtil.compileKotlin(sourcesDirectory.path, classesDirectory)
return File(classesDirectory, "test").listFiles() { it.name.endsWith(".class") }?.sortedBy { it.name }!!
return File(classesDirectory, "test").listFiles() { it -> it.name.endsWith(".class") }?.sortedBy { it.name }!!
}
private fun Printer.printDifference(oldClassFile: File, newClassFile: File) {