1
0
mirror of https://github.com/golang/go synced 2024-10-01 07:28:35 -06:00
go/internal/lsp/testdata/builtins/iota.go
Muir Manders 1d8cfc4bd2 internal/lsp: omit "iota" completion outside const decls
Add a special check to skip builtin "iota" candidate outside of const
declarations.

Change-Id: I767c012585dfc51b4c07cf5847d3b4083a4a2a7b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/195044
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-15 20:16:06 +00:00

14 lines
196 B
Go

package builtins
func _() {
const (
foo = iota //@complete(" //", iota)
)
iota //@complete(" //")
var iota int //@item(iotaVar, "iota", "int", "var")
iota //@complete(" //", iotaVar)
}