summaryrefslogtreecommitdiffstats
path: root/llgo/test/execution/slices/literal.go
blob: 42adabf76bdcf28217752ca9cd21e723d5a39638 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: llgo -o %t %s
// RUN: %t 2>&1 | FileCheck %s

// CHECK: 1
// CHECK-NEXT: 2
// CHECK-NEXT: 3

package main

func main() {
	x := []int{1, 2, 3}
	for i := 0; i < len(x); i++ {
		println(x[i])
	}
}
OpenPOWER on IntegriCloud