Debian Codegraph @

src/cmd/compile/internal/loopvar/testdata/inlines/b/b.go

raw
1 // Copyright 2023 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package b
6
7 var slice = []int{1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024}
8
9 func F() ([]*int, []*int) {
10 return g()
11 }
12
13 func g() ([]*int, []*int) {
14 var s []*int
15 var t []*int
16 for i, j := range slice {
17 s = append(s, &i)
18 t = append(t, &j)
19 }
20 return s[:len(s)-1], t
21 }