Debian Codegraph @

go/analysis/passes/appends/testdata/src/b/b.go

raw symbols SCIP
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 // This file contains tests for the appends checker.
6
7 package b
8
9 func append(args ...interface{}) []int {
10 println(args)
11 return []int{0}
12 }
13
14 func userdefine() {
15 sli := []int{1, 2, 3}
16 sli = append(sli, 4, 5, 6)
17 sli = append(sli)
18 }
19
20 func localvar() {
21 append := func(int) int { return 0 }
22 a := append(1)
23 _ = a
24 }