+inference bugs
+List.ensureCapacity optimized List.fill
This commit is contained in:
1 parent
6ba128f7ba
commit
87060c7eb7
5 files changed
+49
-6
No files matched your search
@@ -436,4 +436,12 @@ class StdlibTest {
|
||||
assertEquals(2, x)
|
||||
""".trimIndent())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testListFill() = runTest {
|
||||
eval("""
|
||||
val x = List.fill(5) { i -> i * 10 }
|
||||
assertEquals([0, 10, 20, 30, 40], x)
|
||||
""".trimIndent())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user