Skip to content

Commit

Permalink
lsp/source: hover_gox.go fix *gox.Func for gopObjectString
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Oct 21, 2023
1 parent 17a5c0b commit d6bab22
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gopls/internal/lsp/source/hover_gox.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/goplus/gop/ast"
"github.com/goplus/gop/format"
"github.com/goplus/gop/token"
"github.com/goplus/gox"
"golang.org/x/text/unicode/runenames"
"golang.org/x/tools/go/types/typeutil"
"golang.org/x/tools/gopls/internal/bug"
Expand Down Expand Up @@ -530,6 +531,10 @@ func gopHoverLit(pgf *ParsedGopFile, lit *ast.BasicLit, pos token.Pos) (protocol
// If spec is non-nil, it may be used to format additional declaration
// syntax, and file must be the token.File describing its positions.
func gopObjectString(obj types.Object, qf types.Qualifier, declPos token.Pos, file *token.File, spec ast.Spec) string {
switch o := obj.(type) {
case *gox.Func:
obj = &o.Func
}
str := types.ObjectString(obj, qf)

switch obj := obj.(type) {
Expand Down

0 comments on commit d6bab22

Please sign in to comment.