Clean-up and improve sam-with-receiver test with scripts

This commit is contained in:
Ilya Chernikov
2020-06-18 19:26:20 +02:00
parent 0ade8140f7
commit d5ffc7416d
3 changed files with 23 additions and 6 deletions
@@ -19,10 +19,14 @@ public class Exec {
void exec(Sam sam) { sam.run("a", "b") }
}
// FILE: test.kts
// FILE: test_with_error.kts
val e = Exec()
e.exec <!TYPE_MISMATCH!>{ <!EXPECTED_PARAMETERS_NUMBER_MISMATCH!>a, <!CANNOT_INFER_PARAMETER_TYPE!>b<!><!> -> System.out.println(a) }<!>
// FILE: test.kts
val e = Exec()
e.exec { b ->
val a: String = this
System.out.println(a)
@@ -30,3 +30,12 @@ public final class Test : kotlin.script.templates.standard.ScriptTemplateWithArg
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class Test_with_error : kotlin.script.templates.standard.ScriptTemplateWithArgs {
public constructor Test_with_error(/*0*/ args: kotlin.Array<kotlin.String>)
public final override /*1*/ /*fake_override*/ val args: kotlin.Array<kotlin.String>
public final val e: Exec
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}