mirror of
https://github.com/golang/go
synced 2024-11-18 16:54:43 -07:00
internal/lsp: add back distinction between var and const symbols
Change-Id: I59f87d4430c93438804cea7cc56a80f12bb42a00 Reviewed-on: https://go-review.googlesource.com/c/tools/+/169441 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
parent
cd3f3f06fc
commit
41a94eb788
@ -115,6 +115,9 @@ func varSymbol(decl ast.Node, name *ast.Ident, obj types.Object, fset *token.Fil
|
||||
Name: obj.Name(),
|
||||
Kind: VariableSymbol,
|
||||
}
|
||||
if _, ok := obj.(*types.Const); ok {
|
||||
s.Kind = ConstantSymbol
|
||||
}
|
||||
if span, err := nodeSpan(decl, fset); err == nil {
|
||||
s.Span = span
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user