Fix array init and add listOf(). (#109)
This commit is contained in:
@@ -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())
|
||||
}
|
||||
Reference in New Issue
Block a user