diff options
Diffstat (limited to 'llgo/test/execution/slices/literal.go')
| -rw-r--r-- | llgo/test/execution/slices/literal.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llgo/test/execution/slices/literal.go b/llgo/test/execution/slices/literal.go new file mode 100644 index 00000000000..42adabf76bd --- /dev/null +++ b/llgo/test/execution/slices/literal.go @@ -0,0 +1,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]) + } +} |

