Minor: replace warning with an assert

KT-8487
This commit is contained in:
Alexey Tsvetkov
2016-03-01 16:18:28 +03:00
parent 6ab868ae33
commit 2140c270d7
@@ -409,9 +409,7 @@ open class KotlinCompile() : AbstractKotlinCompile<K2JVMCompilerArguments>() {
logger.kotlinInfo("compile iteration: ${sourcesToCompile.joinToString{ projectRelativePath(it) }}")
val (existingSource, nonExistingSource) = sourcesToCompile.partition { it.isFile }
if (nonExistingSource.any()) {
logger.warn("Kotlin incremental compilation tried to compile removed files: $nonExistingSource")
}
assert(nonExistingSource.isEmpty()) { "Trying to compile removed files: ${nonExistingSource.map(::projectRelativePath)}" }
val text = existingSource.map { it.canonicalPath }.joinToString(separator = System.getProperty("line.separator"))
dirtySourcesSinceLastTimeFile.writeText(text)