2018-11-13 09:13:53 -07:00
|
|
|
// +build go1.11
|
|
|
|
|
2018-10-29 16:12:41 -06:00
|
|
|
package bad
|
|
|
|
|
2018-11-13 09:13:53 -07:00
|
|
|
// import (
|
2019-02-06 09:24:10 -07:00
|
|
|
// "github.com/bob/pkg" //@diag("\"github.com/bob/pkg\"", "LSP", "unable to import "\"github.com/bob/pkg\"")
|
2018-11-13 09:13:53 -07:00
|
|
|
// )
|
|
|
|
|
2019-02-06 09:24:10 -07:00
|
|
|
var a unknown //@item(global_a, "a", "unknown", "var"),diag("unknown", "LSP", "undeclared name: unknown")
|
2018-11-13 09:13:53 -07:00
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
func random() int { //@item(random, "random", "func() int", "func")
|
2018-11-13 09:13:53 -07:00
|
|
|
//@complete("", global_a, bob, random, random2, random3, stuff)
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
func random2(y int) int { //@item(random2, "random2", "func(y int) int", "func"),item(bad_y_param, "y", "int", "parameter")
|
2019-02-06 09:24:10 -07:00
|
|
|
x := 6 //@item(x, "x", "int", "var"),diag("x", "LSP", "x declared but not used")
|
|
|
|
var q blah //@item(q, "q", "blah", "var"),diag("q", "LSP", "q declared but not used"),diag("blah", "LSP", "undeclared name: blah")
|
|
|
|
var t blob //@item(t, "t", "blob", "var"),diag("t", "LSP", "t declared but not used"),diag("blob", "LSP", "undeclared name: blob")
|
2018-11-13 09:13:53 -07:00
|
|
|
//@complete("", q, t, x, bad_y_param, global_a, bob, random, random2, random3, stuff)
|
|
|
|
|
2018-10-29 16:12:41 -06:00
|
|
|
return y
|
|
|
|
}
|
2018-11-13 09:13:53 -07:00
|
|
|
|
2019-07-02 16:10:05 -06:00
|
|
|
func random3(y ...int) { //@item(random3, "random3", "func(y ...int)", "func"),item(y_variadic_param, "y", "[]int", "parameter")
|
2018-11-13 09:13:53 -07:00
|
|
|
//@complete("", y_variadic_param, global_a, bob, random, random2, random3, stuff)
|
|
|
|
}
|