aboutsummaryrefslogtreecommitdiff
path: root/internal/lsp/testdata/badstmt/badstmt.go.in
blob: 5a56079108628a55bd9715cc427a2b76ff7f83a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package badstmt

import (
	"golang.org/x/tools/internal/lsp/foo"
)

func _() {
	defer foo.F //@complete(" //", Foo),diag(" //", "syntax", "function must be invoked in defer statement", "error")
	y := 1
	defer foo.F //@complete(" //", Foo)
}

func _() {
	switch true {
	case true:
		go foo.F //@complete(" //", Foo)
	}
}

func _() {
	defer func() {
		foo.F //@complete(" //", Foo),snippet(" //", Foo, "Foo()", "Foo()")

		foo. //@rank(" //", Foo)
	}
}