bugfix: elvis + throw
This commit is contained in:
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("""
|
||||
|
||||
Reference in new issue
Block a user