This test checks completion related to index expressions.

-- flags --
-ignore_extra_diags

-- settings.json --
{
	"completeUnimported": false
}

-- index.go --
package index

func _() {
	var (
		aa = "123" //@item(indexAA, "aa", "string", "var")
		ab = 123   //@item(indexAB, "ab", "int", "var")
	)

	var foo [1]int
	foo[a]  //@complete(re"()\\]", indexAB, indexAA)
	foo[:a] //@complete(re"()\\]", indexAB, indexAA)
	a[:a]   //@complete(re"()\\[", indexAA, indexAB)
	a[a]    //@complete(re"()\\[", indexAA, indexAB)

	var bar map[string]int
	bar[a] //@complete(re"()\\]", indexAA, indexAB)

	type myMap map[string]int
	var baz myMap
	baz[a] //@complete(re"()\\]", indexAA, indexAB)

	type myInt int
	var mi myInt //@item(indexMyInt, "mi", "myInt", "var")
	foo[m]       //@snippet(re"()\\]", indexMyInt, "mi")
}
