Extract platform-independent default imports to TargetPlatform.Default.defaultImports

This is needed because SourceNavigationHelper uses default platform and it
needs default imports to be able to resolve references (otherwise
NavigateToLibrarySourceTestGenerated breaks)
This commit is contained in:
Alexander Udalov
2016-10-21 10:39:35 +03:00
parent 9ec781e859
commit 56e2173b3c
11 changed files with 56 additions and 58 deletions
@@ -16,7 +16,6 @@
package org.jetbrains.kotlin.js.resolve
import com.google.common.collect.ImmutableList
import org.jetbrains.kotlin.builtins.DefaultBuiltIns
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.resolve.ImportPath
@@ -24,14 +23,8 @@ import org.jetbrains.kotlin.resolve.PlatformConfigurator
import org.jetbrains.kotlin.resolve.TargetPlatform
object JsPlatform : TargetPlatform("JS") {
override val defaultImports: List<ImportPath> = ImmutableList.of(
override val defaultImports: List<ImportPath> = Default.defaultImports + listOf(
ImportPath("java.lang.*"),
ImportPath("kotlin.*"),
ImportPath("kotlin.annotation.*"),
ImportPath("kotlin.collections.*"),
ImportPath("kotlin.ranges.*"),
ImportPath("kotlin.sequences.*"),
ImportPath("kotlin.text.*"),
ImportPath("kotlin.js.*")
)