Refine variable resolution logic, update type alias syntax

This commit is contained in:
sergeych committed 2026-02-17 08:17:57 +03:00
1 parent b6851b7098
commit df19524177
4 files changed
+37 -7

No files matched your search

@@ -157,4 +157,19 @@ class StdlibTest {
"""
)
}
@Test
fun testFilter3() = runTest {
eval("""
type Numeric = Int | Real
fun process<T: Numeric>(items: List<T>): List<T> {
items.filter { it > 0 }.map { it * it }
}
val data: List<Int> = [-2, -1, 0, 1, 2]
println("Processed: " + process(data))
""".trimIndent())
}
}