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:
@@ -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")
|
||||
|
||||
+2
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user