mirror of
https://github.com/golang/go
synced 2024-11-19 07:14:45 -07:00
9c4a82ab32
source.DiagnosticSeverity and source.CompletionItemKind are duplicated and not worth maintaining. Change-Id: I8d6c8621a227855309c0977da59d8c9fa53617bf Reviewed-on: https://go-review.googlesource.com/c/tools/+/197177 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
22 lines
891 B
Go
22 lines
891 B
Go
package good //@diag("package", "no_diagnostics", "")
|
|
|
|
import (
|
|
_ "go/ast" //@prepare("go/ast", "_", "_")
|
|
"golang.org/x/tools/internal/lsp/types" //@item(types_import, "types", "\"golang.org/x/tools/internal/lsp/types\"", "package"),prepare("types","\"", "types")
|
|
)
|
|
|
|
func random() int { //@item(good_random, "random", "func() int", "func")
|
|
_ = "random() int" //@prepare("random", "", "")
|
|
y := 6 + 7 //@prepare("7", "", "")
|
|
return y //@prepare("return", "","")
|
|
}
|
|
|
|
func random2(y int) int { //@item(good_random2, "random2", "func(y int) int", "func"),item(good_y_param, "y", "int", "var")
|
|
//@complete("", good_y_param, types_import, good_random, good_random2, good_stuff)
|
|
var b types.Bob = &types.X{} //@prepare("ypes","types", "types")
|
|
if _, ok := b.(*types.X); ok { //@complete("X", X_struct, Y_struct, Bob_interface)
|
|
}
|
|
|
|
return y
|
|
}
|