mirror of
https://github.com/golang/go.git
synced 2025-05-20 14:53:23 +00:00
Fixes golang/go#29370 Change-Id: I160b00f95fe44b2d87f66dc5842bb3a124e0292c GitHub-Last-Rev: 924c13bc86f947ca01b291e7cc0d171164c2c856 GitHub-Pull-Request: golang/tools#69 Reviewed-on: https://go-review.googlesource.com/c/157678 Reviewed-by: Rebecca Stambler <rstambler@golang.org>
25 lines
649 B
Go
25 lines
649 B
Go
package foo
|
|
|
|
type StructFoo struct { //@item(StructFoo, "StructFoo", "struct{...}", "struct")
|
|
Value int //@item(Value, "Value", "int", "field")
|
|
}
|
|
|
|
// Pre-set this marker, as we don't have a "source" for it in this package.
|
|
/* Error() */ //@item(Error, "Error()", "string", "method")
|
|
|
|
func Foo() { //@item(Foo, "Foo()", "", "func")
|
|
var err error
|
|
err.Error() //@complete("E", Error)
|
|
}
|
|
|
|
func _() {
|
|
var sFoo StructFoo //@complete("t", StructFoo)
|
|
if x := sFoo; x.Value == 1 { //@complete("V", Value),typdef("sFoo", StructFoo)
|
|
return
|
|
}
|
|
}
|
|
|
|
//@complete("", Foo, IntFoo, StructFoo)
|
|
|
|
type IntFoo int //@item(IntFoo, "IntFoo", "int", "type")
|