mirror of
https://github.com/golang/go
synced 2024-11-19 02:44:44 -07:00
6e267b5cc7
New tests include cases for anonymous structs, composite literals, ranking of results in binary expressions, and import cycles. Change-Id: Ic02e84e09101bb9873fc1705bba2594d655bb45b Reviewed-on: https://go-review.googlesource.com/c/153443 Reviewed-by: Ian Cottrell <iancottrell@google.com>
24 lines
504 B
Go
24 lines
504 B
Go
package anon
|
|
|
|
func _() {
|
|
for _, _ := range []struct {
|
|
i, j int //@item(anonI, "i", "int", "field"),item(anonJ, "j", "int", "field")
|
|
}{
|
|
{
|
|
i: 1,
|
|
//@complete("", anonJ)
|
|
},
|
|
{
|
|
//@complete("", anonI, anonJ)
|
|
},
|
|
} {
|
|
continue
|
|
}
|
|
|
|
s := struct{ f int }{ } //@item(anonF, "f", "int", "field"),item(structS, "s", "struct{...}", "var"),complete(" }", anonF)
|
|
|
|
_ = map[struct{ x int }]int{ //@item(anonX, "x", "int", "field")
|
|
struct{ x int }{ }: 1, //@complete(" }", anonX, structS)
|
|
}
|
|
}
|