K2 Scripting: fix order of arguments processing
and base class handling: Since in K2 we do not distinguish between script arguments taken from the base class and provided properties, we need this extra functionality to preserve the argument order of K1 scripts. This is a temporary measure, since we're going to deprecate base class usage at some point (KT-60449), so the relevant constructor arguments should disappear too.
This commit is contained in:
committed by
Space Team
parent
96bde033e1
commit
020a590df7
+1
-1
@@ -22,7 +22,7 @@ import kotlin.script.experimental.jvmhost.createJvmEvaluationConfigurationFromTe
|
||||
class ConfigurationDslTest : TestCase() {
|
||||
|
||||
@Test
|
||||
fun testComposableRefinementHandlers() = expectTestToFailOnK2 {
|
||||
fun testComposableRefinementHandlers() {
|
||||
val baseConfig = createJvmCompilationConfigurationFromTemplate<SimpleScript> {
|
||||
updateClasspath(classpathFromClass<SimpleScript>())
|
||||
defaultImports(MyTestAnnotation1::class, MyTestAnnotation2::class)
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ class ConstructorArgumentsOrderTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testScriptWithBoth() = expectTestToFailOnK2 {
|
||||
fun testScriptWithBoth() {
|
||||
val res = evalString<ScriptWithBoth>("""println(providedString + receiverString)""") {
|
||||
providedProperties("providedString" to "Hello")
|
||||
implicitReceivers(ImplicitReceiverClass(" Both!"))
|
||||
|
||||
Reference in New Issue
Block a user