Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / golang.org / x / tools@v0.0.0-20201105173854-bc9fc8d8c4bc / internal / lsp / testdata / bad / bad0.go
1 // +build go1.11
2
3 package bad
4
5 import _ "golang.org/x/tools/internal/lsp/assign/internal/secret" //@diag("\"golang.org/x/tools/internal/lsp/assign/internal/secret\"", "compiler", "could not import golang.org/x/tools/internal/lsp/assign/internal/secret (invalid use of internal package golang.org/x/tools/internal/lsp/assign/internal/secret)", "error")
6
7 func stuff() { //@item(stuff, "stuff", "func()", "func")
8         x := "heeeeyyyy"
9         random2(x) //@diag("x", "compiler", "cannot use x (variable of type string) as int value in argument to random2", "error")
10         random2(1) //@complete("dom", random, random2, random3)
11         y := 3     //@diag("y", "compiler", "y declared but not used", "error")
12 }
13
14 type bob struct { //@item(bob, "bob", "struct{...}", "struct")
15         x int
16 }
17
18 func _() {
19         var q int
20         _ = &bob{
21                 f: q, //@diag("f", "compiler", "unknown field f in struct literal", "error")
22         }
23 }