Debian Codegraph @

test/fixedbugs/issue15055.go

raw
1 // errorcheck
2
3 // Copyright 2016 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 package main
8
9 func main() {
10 type name string
11 _ = []byte("abc", "def", 12) // ERROR "too many arguments (to conversion to \[\]byte: \(\[\]byte\)\(.abc., .def., 12\))?"
12 _ = string("a", "b", nil) // ERROR "too many arguments (to conversion to string: string\(.a., .b., nil\))?"
13 _ = []byte() // ERROR "missing argument (to conversion to \[\]byte: \(\[\]byte\)\(\))?"
14 _ = string() // ERROR "missing argument (to conversion to string: string\(\))?"
15 _ = *int() // ERROR "missing argument (to conversion to int: int\(\))?"
16 _ = (*int)() // ERROR "missing argument (to conversion to \*int: \(\*int\)\(\))?"
17 _ = name("a", 1, 3.3) // ERROR "too many arguments (to conversion to name: name\(.a., 1, 3.3\))?"
18 _ = map[string]string(nil, nil) // ERROR "too many arguments (to conversion to map\[string\]string: \(map\[string\]string\)\(nil, nil\))?"
19 }