mirror of
https://github.com/golang/go
synced 2024-11-18 20:14:43 -07:00
719fbf7c21
Fixes golang/go#32414 Change-Id: If08e655d7a0e29b0865c13d8377e98be01cf24c5 Reviewed-on: https://go-review.googlesource.com/c/tools/+/184777 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
20 lines
623 B
Go
20 lines
623 B
Go
package good //@diag("package", "", "")
|
|
|
|
import (
|
|
"golang.org/x/tools/internal/lsp/types" //@item(types_import, "types", "\"golang.org/x/tools/internal/lsp/types\"", "package")
|
|
)
|
|
|
|
func random() int { //@item(good_random, "random", "func() int", "func")
|
|
y := 6 + 7
|
|
return y
|
|
}
|
|
|
|
func random2(y int) int { //@item(good_random2, "random2", "func(y int) int", "func"),item(good_y_param, "y", "int", "parameter")
|
|
//@complete("", good_y_param, types_import, good_random, good_random2, good_stuff)
|
|
var b types.Bob = &types.X{}
|
|
if _, ok := b.(*types.X); ok { //@complete("X", X_struct, Y_struct, Bob_interface)
|
|
}
|
|
|
|
return y
|
|
}
|