Drop TargetPlatform in utilities for module creation

This commit is contained in:
Alexander Udalov
2016-10-20 11:02:05 +03:00
parent 56e2173b3c
commit 4c52ce37d2
15 changed files with 20 additions and 60 deletions
@@ -235,8 +235,9 @@ public class SourceNavigationHelper {
@NotNull Collection<KtNamedDeclaration> candidates,
@NotNull Project project
) {
MutableModuleContext newModuleContext =
ContextKt.ContextForNewModule(project, Name.special("<library module>"), DefaultBuiltIns.getInstance());
MutableModuleContext newModuleContext = ContextKt.ContextForNewModule(
ContextKt.ProjectContext(project), Name.special("<library module>"), DefaultBuiltIns.getInstance()
);
newModuleContext.setDependencies(newModuleContext.getModule(), newModuleContext.getModule().getBuiltIns().getBuiltInsModule());
@@ -49,7 +49,7 @@ class KotlinJavaScriptDecompiledTextConsistencyTest : TextConsistencyBaseTest()
override fun getModuleDescriptor(): ModuleDescriptor {
val stdlibJar = PathUtil.getKotlinPathsForDistDirectory().jsStdLibJarPath.absolutePath
val module = KotlinTestUtils.createEmptyModule("<module for stdlib>", JsPlatform, JsPlatform.builtIns)
val module = KotlinTestUtils.createEmptyModule("<module for stdlib>", JsPlatform.builtIns)
val metadata = KotlinJavascriptMetadataUtils.loadMetadata(stdlibJar)
assert(metadata.size == 1)