Add basic iterators. (#58)
This commit is contained in:
@@ -373,3 +373,7 @@ task link(type: LinkKonanTest) {
|
||||
lib = "link/lib"
|
||||
} */
|
||||
|
||||
task for0(type: RunKonanTest) {
|
||||
goldValue = "2\n3\n4\n"
|
||||
source = "runtime/basic/for0.kt"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fun main(args : Array<String>) {
|
||||
val byteArray = ByteArray(3)
|
||||
byteArray[0] = 2
|
||||
byteArray[1] = 3
|
||||
byteArray[2] = 4
|
||||
for (item in byteArray) {
|
||||
println(item)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user