mirror of
https://github.com/golang/go
synced 2024-11-19 02:54:42 -07:00
889af361d2
go/parser has switched from reporting no position for the end of a broken file to reporting an invalid position. This broke on of our tests that contains broken code. Change the test case as a result. Change-Id: I4feb7790539994e593c56d5ae84929364c1eec1c Reviewed-on: https://go-review.googlesource.com/c/tools/+/204202 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
20 lines
540 B
Go
20 lines
540 B
Go
package rank
|
|
|
|
var (
|
|
apple int = 3 //@item(apple, "apple", "int", "var")
|
|
pear string = "hello" //@item(pear, "pear", "string", "var")
|
|
)
|
|
|
|
func _() {
|
|
orange := 1 //@item(orange, "orange", "int", "var")
|
|
grape := "hello" //@item(grape, "grape", "string", "var")
|
|
orange, grape = 2, "hello" //@complete(" \"", grape, pear, orange, apple)
|
|
}
|
|
|
|
func _() {
|
|
var pineapple int //@item(pineapple, "pineapple", "int", "var")
|
|
pineapple = 1 //@complete(" 1", pineapple, apple, pear)
|
|
|
|
y := //@complete(" /", pineapple, apple, pear)
|
|
}
|