bugfix: elvis + throw

This commit is contained in:
sergeych committed 2025-08-18 01:19:49 +03:00
1 parent 95c1da60ed
commit fb6e2aa49e
2 files changed
+29 -5

No files matched your search

@@ -2971,6 +2971,16 @@ class ScriptTest {
""".trimIndent())
}
@Test
fun testElvisAndThrow2() = runTest {
eval("""
val t = "112"
val x = t ?: run { throw "testx" }
}
assertEquals( "112", x)
""".trimIndent())
}
@Test
fun testElvisAndRunThrow() = runTest {
eval("""