Implement proper expression generation for the last script line
fixes problem with result fields #KT-33127 fixed
This commit is contained in:
+14
@@ -55,6 +55,20 @@ class ReplTest : TestCase() {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testEvalWithIfResult() {
|
||||
chechEvaluateInRepl(
|
||||
simpleScriptompilationConfiguration,
|
||||
simpleScriptEvaluationConfiguration,
|
||||
sequenceOf(
|
||||
"val x = 5",
|
||||
"x + 6",
|
||||
"if (x < 10) res1 * 2 else x"
|
||||
),
|
||||
sequenceOf(null, 11, 22)
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testImplicitReceiver() {
|
||||
val receiver = TestReceiver()
|
||||
|
||||
Reference in New Issue
Block a user