K2 Scripting: enable K2 tests in some test projects

This commit is contained in:
Ilya Chernikov
2022-11-17 12:26:00 +01:00
committed by Space Team
parent 90a4f6002e
commit deb2d6d024
7 changed files with 72 additions and 5 deletions
@@ -59,3 +59,9 @@ projectTest(taskName = "testWithIr", parallel = true) {
workingDir = rootDir
systemProperty("kotlin.script.base.compiler.arguments", "-Xuse-ir")
}
projectTest(taskName = "testWithK2", parallel = true) {
dependsOn(":dist")
workingDir = rootDir
systemProperty("kotlin.script.base.compiler.arguments", "-Xuse-k2")
}
@@ -255,7 +255,7 @@ class ScriptingHostTest : TestCase() {
}
assertTrue(comp0 is ResultWithDiagnostics.Failure)
val errors = comp0.reports.filter { it.severity == ScriptDiagnostic.Severity.ERROR }
assertTrue( errors.any { it.message == "Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String?" })
assertTrue( errors.any { it.message.contains( "Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type ") })
// runtime
fun evalWith(evalConfig: ScriptEvaluationConfiguration) =