Add explicit imports of kotlin.js.* to generated files.

This commit is contained in:
Ilya Gorbunov
2017-01-27 23:25:05 +03:00
parent cd5f68f119
commit 25c3064554
23 changed files with 25 additions and 0 deletions
@@ -61,6 +61,7 @@ fun main(args: Array<String>) {
w.appendln("package $pkg")
w.appendln()
w.appendln("import kotlin.js.*")
allPackages.filter { it != pkg }.forEach { import ->
w.appendln("import $import.*")
}
@@ -99,6 +99,9 @@ private fun List<ConcreteFunction>.writeTo(file: File, sourceFile: SourceFile, p
writer.append("package ${sourceFile.packageName ?: "kotlin"}\n\n")
writer.append("$COMMON_AUTOGENERATED_WARNING\n\n")
if (platform == Platform.JS) {
writer.appendln("import kotlin.js.*")
}
writer.append("import kotlin.comparisons.*\n\n")
for (f in this) {