mirror of
https://github.com/golang/go
synced 2024-11-19 02:04:42 -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>
27 lines
534 B
Go
27 lines
534 B
Go
package complit
|
|
|
|
type position struct { //@item(structPosition, "position", "struct{...}", "struct")
|
|
X, Y int //@item(fieldX, "X", "int", "field"),item(fieldY, "Y", "int", "field")
|
|
}
|
|
|
|
func _() {
|
|
_ := position{
|
|
//@complete("", fieldX, fieldY, structPosition)
|
|
}
|
|
_ := position{
|
|
X: 1,
|
|
//@complete("", fieldY)
|
|
}
|
|
_ := position{
|
|
//@complete("", fieldX)
|
|
Y: 1,
|
|
}
|
|
}
|
|
|
|
func _() {
|
|
_ := position{
|
|
X: 1, //@complete("X", fieldX),complete(" 1", structPosition)
|
|
Y: , //@complete(":", fieldY),complete(" ,", structPosition)
|
|
}
|
|
}
|