blob: 37d8cf73b6502c488ee6fc68f12a5714f7806810 [file] [log] [blame]
This test checks completion related to anonymous structs.
-- flags --
-ignore_extra_diags
-- settings.json --
{
"deepCompletion": false
}
-- anon.go --
package anon
// Literal completion results.
/* int() */ //@item(int, "int()", "int", "var")
func _() {
for _, _ := range []struct {
i, j int //@item(anonI, "i", "int", "field"),item(anonJ, "j", "int", "field")
}{
{
i: 1,
//@complete("", anonJ)
},
{
//@complete("", anonI, anonJ, int)
},
} {
continue
}
s := struct{ f int }{ } //@item(anonF, "f", "int", "field"),item(structS, "s", "struct{...}", "var"),complete(" }", anonF, int)
_ = map[struct{ x int }]int{ //@item(anonX, "x", "int", "field")
struct{ x int }{ }: 1, //@complete(" }", anonX, int, structS)
}
}