[minor] fix warnings in the script compiler and tests
This commit is contained in:
@@ -45,8 +45,6 @@ sourceSets {
|
|||||||
|
|
||||||
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
languageVersion = "1.3"
|
|
||||||
apiVersion = "1.3"
|
|
||||||
freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-metadata-version-check"
|
freeCompilerArgs = freeCompilerArgs - "-progressive" + "-Xskip-metadata-version-check"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -111,6 +111,7 @@ class ReplFromTerminal(
|
|||||||
is ReplEvalResult.Error.Runtime -> writer.outputRuntimeError(evalResult.message)
|
is ReplEvalResult.Error.Runtime -> writer.outputRuntimeError(evalResult.message)
|
||||||
is ReplEvalResult.Error.CompileTime -> writer.outputRuntimeError(evalResult.message)
|
is ReplEvalResult.Error.CompileTime -> writer.outputRuntimeError(evalResult.message)
|
||||||
is ReplEvalResult.Incomplete -> writer.notifyIncomplete()
|
is ReplEvalResult.Incomplete -> writer.notifyIncomplete()
|
||||||
|
is ReplEvalResult.HistoryMismatch -> {} // assuming handled elsewhere
|
||||||
}
|
}
|
||||||
return evalResult
|
return evalResult
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -157,7 +157,7 @@ object CompileTimeFibonacciConfiguration : ScriptCompilationConfiguration(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
?.valueOr { return@onAnnotations it }
|
?.valueOr { return@onAnnotations it }
|
||||||
?.max() ?: return@onAnnotations context.compilationConfiguration.asSuccess()
|
?.maxOrNull() ?: return@onAnnotations context.compilationConfiguration.asSuccess()
|
||||||
|
|
||||||
val sourceCode = fibUntil(maxFibonacciNumber)
|
val sourceCode = fibUntil(maxFibonacciNumber)
|
||||||
.mapIndexed { index, number -> "val FIB_${index + 1} = $number" }
|
.mapIndexed { index, number -> "val FIB_${index + 1} = $number" }
|
||||||
|
|||||||
Reference in New Issue
Block a user