[minor] disable implicits test on IR, see added comments for details
This commit is contained in:
+14
-9
@@ -35,16 +35,21 @@ import kotlin.script.experimental.jvmhost.JvmScriptCompiler
|
|||||||
*/
|
*/
|
||||||
class ImplicitsFromScriptResultTest : TestCase() {
|
class ImplicitsFromScriptResultTest : TestCase() {
|
||||||
fun testImplicits() {
|
fun testImplicits() {
|
||||||
val host = CompilerHost()
|
if (System.getProperty("kotlin.script.base.compiler.arguments")?.contains("-Xuse-ir") != true) {
|
||||||
|
// the implementation of the Compiler Host doesn't work with IR - the inter-script symbol table
|
||||||
|
// should be maintained to make it run (see latest REPL compiler implementations for details
|
||||||
|
// TODO: consider either fix it or rewrite to the REPL compiler
|
||||||
|
val host = CompilerHost()
|
||||||
|
|
||||||
val snippets = listOf(
|
val snippets = listOf(
|
||||||
"val xyz0 = 42",
|
"val xyz0 = 42",
|
||||||
"fun f() = xyz0",
|
"fun f() = xyz0",
|
||||||
"val finalRes = xyz0 + f()",
|
"val finalRes = xyz0 + f()",
|
||||||
)
|
)
|
||||||
for (snippet in snippets) {
|
for (snippet in snippets) {
|
||||||
val res = host.compile(snippet)
|
val res = host.compile(snippet)
|
||||||
assertTrue(res is ResultWithDiagnostics.Success)
|
assertTrue(res is ResultWithDiagnostics.Success)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user