v1.1.0-beta1: mini function declarations and working properties

This commit is contained in:
sergeych committed 2025-12-23 13:06:46 +01:00
1 parent 17b4904ae3
commit 8300c2a3ab
5 files changed
+39 -7

No files matched your search

+15 -1
View File
@@ -3697,7 +3697,7 @@ class ScriptTest {
}
// @Test
@Test
fun testMinimumOptimization() = runTest {
for (i in 1..200) {
bm {
@@ -4518,4 +4518,18 @@ class ScriptTest {
""".trimIndent()
)
}
@Test
fun testFunMiniDeclaration() = runTest {
eval("""
class T(x) {
fun method() = x + 1
}
fun median(a,b) = (a+b)/2
assertEquals(11, T(10).method())
assertEquals(2, median(1,3))
""".trimIndent())
}
}