Misc: Protect freeArgs with FreezableVar

Original commit: 87f3d24f9b
This commit is contained in:
Alexey Sedunov
2017-10-12 19:46:18 +03:00
parent 1079d74422
commit 5ec73d6fbd
3 changed files with 3 additions and 2 deletions
@@ -59,6 +59,7 @@ private fun readV1Config(element: Element): KotlinFacetSettings {
val jsArgumentsElement = compilerInfoElement?.getOptionBody("k2jsCompilerArguments")
val compilerArguments = targetPlatform.createCompilerArguments()
compilerArguments.freeArgs = ArrayList()
commonArgumentsElement?.let { XmlSerializer.deserializeInto(compilerArguments, it) }
when (compilerArguments) {
@@ -138,7 +138,7 @@ abstract class AbstractJsLookupTrackerTest : AbstractLookupTrackerTest() {
val args = K2JSCompilerArguments().apply {
outputFile = File(outDir, "out.js").canonicalPath
reportOutputFiles = true
freeArgs.addAll(filesToCompile.map { it.canonicalPath })
freeArgs = filesToCompile.map { it.canonicalPath }
}
return runJSCompiler(args, env)
}
@@ -56,7 +56,7 @@ abstract class AbstractJsProtoComparisonTest : AbstractProtoComparisonTest<Proto
outputFile = File(outputDir, "out.js").canonicalPath
metaInfo = true
main = K2JsArgumentConstants.NO_CALL
freeArgs.addAll(ktFiles)
freeArgs = ktFiles
}
val env = createTestingCompilerEnvironment(messageCollector, outputItemsCollector, services)