blob: 264ae77eab85e456cdb024122831d96a39737c1e [file] [log] [blame]
This test checks completion of nested composite literals;
Parser recovery changed in Go 1.20, so this test requires at least that
version for consistency.
-- flags --
-ignore_extra_diags
-min_go=go1.20
-- nested_complit.go --
package nested_complit
type ncFoo struct {} //@item(structNCFoo, "ncFoo", "struct{...}", "struct")
type ncBar struct { //@item(structNCBar, "ncBar", "struct{...}", "struct")
baz []ncFoo
}
func _() {
_ = []ncFoo{} //@item(litNCFoo, "[]ncFoo{}", "", "var")
_ = make([]ncFoo, 0) //@item(makeNCFoo, "make([]ncFoo, 0)", "", "func")
_ := ncBar{
baz: [] //@complete(" //", litNCFoo, makeNCFoo, structNCBar, structNCFoo)
}
}