[minor] fix warnings in the script compiler and tests

This commit is contained in:
Ilya Chernikov
2021-02-09 22:02:16 +01:00
parent d0f26abd18
commit 79b4b18e25
3 changed files with 2 additions and 3 deletions
@@ -45,8 +45,6 @@ sourceSets {
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
kotlinOptions {
languageVersion = "1.3"
apiVersion = "1.3"
freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-metadata-version-check"
}
}
@@ -111,6 +111,7 @@ class ReplFromTerminal(
is ReplEvalResult.Error.Runtime -> writer.outputRuntimeError(evalResult.message)
is ReplEvalResult.Error.CompileTime -> writer.outputRuntimeError(evalResult.message)
is ReplEvalResult.Incomplete -> writer.notifyIncomplete()
is ReplEvalResult.HistoryMismatch -> {} // assuming handled elsewhere
}
return evalResult
}
@@ -157,7 +157,7 @@ object CompileTimeFibonacciConfiguration : ScriptCompilationConfiguration(
)
}
?.valueOr { return@onAnnotations it }
?.max() ?: return@onAnnotations context.compilationConfiguration.asSuccess()
?.maxOrNull() ?: return@onAnnotations context.compilationConfiguration.asSuccess()
val sourceCode = fibUntil(maxFibonacciNumber)
.mapIndexed { index, number -> "val FIB_${index + 1} = $number" }