1
0
mirror of https://github.com/golang/go synced 2024-11-19 08:44:39 -07:00
go/internal/lsp/testdata/rank/convert_rank.go.in

40 lines
1.1 KiB
Go
Raw Normal View History

package rank
func _() {
type strList []string
wantsStrList := func(strList) {}
var (
convA string //@item(convertA, "convA", "string", "var")
convB []string //@item(convertB, "convB", "[]string", "var")
)
wantsStrList(strList(conv)) //@complete("))", convertB, convertA)
}
func _() {
const (
convC = "hi" //@item(convertC, "convC", "string", "const")
convD = 123 //@item(convertD, "convD", "int", "const")
convE int = 123 //@item(convertE, "convE", "int", "const")
convF string = "there" //@item(convertF, "convF", "string", "const")
)
var foo int
foo = conv //@complete(" //", convertD, convertE, convertC, convertF)
type myInt int
var mi myInt
mi = conv //@complete(" //", convertD, convertC, convertE, convertF)
mi + conv //@complete(" //", convertD, convertC, convertE, convertF)
1 + conv //@complete(" //", convertD, convertE, convertC, convertF)
type myString string
var ms myString
ms = conv //@complete(" //", convertC, convertD, convertE, convertF)
type myUint uint32
var mu myUint
mu = conv //@complete(" //", convertD, convertC, convertE, convertF)
}