blob: 81aee201d7f794618bb0f9377dbd0cf1ef97ab5a [file] [log] [blame]
package badstmt
import (
"golang.org/lsptests/foo"
)
// The nonewvars expectation asserts that the go/analysis framework ran.
// See comments in noparse.
func _(x int) {
defer foo.F //@complete(" //", Foo),diag(" //", "syntax", "function must be invoked in defer statement|expression in defer must be function call", "error")
defer foo.F //@complete(" //", Foo)
x := 123 //@diag(":=", "nonewvars", "no new variables", "warning")
}
func _() {
switch true {
case true:
go foo.F //@complete(" //", Foo)
}
}
func _() {
defer func() {
foo.F //@complete(" //", Foo),snippet(" //", Foo, "Foo()", "Foo()")
foo. //@rank(" //", Foo)
}
}