mirror of
https://github.com/golang/go
synced 2024-11-19 04:04:47 -07:00
7124308813
This change will add another parameter to the diagnostic markers (@diag). Change-Id: I69f4672e7d5417099c11d1a46d9bc45a4d1e5ecc Reviewed-on: https://go-review.googlesource.com/c/tools/+/217719 Run-TryBot: Rohan Challa <rohan@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
26 lines
473 B
Go
26 lines
473 B
Go
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. //@complete(" //", Foo, IntFoo, StructFoo)
|
|
}
|
|
}
|