Temporary fixes for Kotlin project after enabling NI

Most of these fixes will gone away after compiler bootstraping
This commit is contained in:
Mikhail Zarechenskiy
2020-02-06 10:06:59 +03:00
parent cdf5323f8c
commit c64577b735
10 changed files with 15 additions and 14 deletions
@@ -31,7 +31,7 @@ class AutoloadedScriptDefinitions(
loadScriptTemplatesFromClasspath(
listOf("org.jetbrains.kotlin.mainKts.MainKtsScript"),
mainKtsJars,
emptyList(),
emptyList<File>(),
baseClassloader,
hostConfiguration,
messageReporter
@@ -72,7 +72,7 @@ private fun scriptTemplatesDiscoverySequence(
hostConfiguration: ScriptingHostConfiguration,
messageReporter: MessageReporter
): Sequence<ScriptDefinition> {
return sequence {
return sequence<ScriptDefinition> {
// for jar files the definition class is expected in the same jar as the discovery file
// in case of directories, the class output may come separate from the resources, so some candidates should be deffered and processed later
val defferedDirDependencies = ArrayList<File>()
@@ -165,7 +165,7 @@ fun loadScriptTemplatesFromClasspath(
messageReporter: MessageReporter
): Sequence<ScriptDefinition> =
if (scriptTemplates.isEmpty()) emptySequence()
else sequence {
else sequence<ScriptDefinition> {
// trying the direct classloading from baseClassloader first, since this is the most performant variant
val (initialLoadedDefinitions, initialNotFoundTemplates) = scriptTemplates.partitionMapNotNull {
loadScriptDefinition(