Fix array init and add listOf(). (#109)

This commit is contained in:
Nikolay Igotti
2016-12-02 13:18:57 +03:00
committed by GitHub
parent 35dfb35246
commit 83dcb0fc3a
7 changed files with 23 additions and 14 deletions
+1 -1
View File
@@ -478,7 +478,7 @@ task array_list1(type: RunKonanTest) {
}
task listof0(type: RunKonanTest) {
goldValue = "abc\n"
goldValue = "abc\n[a, b, c, d]\n[n, s, a]\n"
source = "runtime/collections/listof0.kt"
}
@@ -2,4 +2,9 @@ fun main(args : Array<String>) {
val list = arrayListOf("a", "b", "c")
for (element in list) print(element)
println()
list.add("d")
println(list.toString())
val list2 = listOf("n", "s", "a")
println(list2.toString())
}