Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions internal/lookup/lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,7 @@ func (p *Global) GetSymbolOfObject(obj types.Object) (*scip.SymbolInformation, b
case *types.Builtin:
return nil, false, nil
case *types.Func:
if orig := obj.Origin(); orig != nil {
name := orig.FullName()
switch name {
case "(error).Error":
return nil, false, nil
}
}
return nil, false, nil
}

panic(fmt.Sprintf("failed to create symbol for builtin obj: %T %+v | %s", obj, obj, obj.Id()))
Expand Down
11 changes: 11 additions & 0 deletions internal/testdata/snapshots/input/pr258/consumer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package consumer

import "github.com/example/deplib"

var Sentinel deplib.CustomErr

func New() deplib.CustomErr { return nil }

type Wrapper struct {
Err deplib.CustomErr
}
3 changes: 3 additions & 0 deletions internal/testdata/snapshots/input/pr258/deplib/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package deplib

type CustomErr error
3 changes: 3 additions & 0 deletions internal/testdata/snapshots/input/pr258/deplib/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/example/deplib

go 1.22
7 changes: 7 additions & 0 deletions internal/testdata/snapshots/input/pr258/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module sg/pr258

go 1.22

require github.com/example/deplib v0.0.0

replace github.com/example/deplib => ./deplib
46 changes: 46 additions & 0 deletions internal/testdata/snapshots/output/pr258/consumer.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package consumer
// ^^^^^^^^ definition 0.1.test `sg/pr258`/
// kind Package
// display_name consumer
// signature_documentation
// > package consumer

import "github.com/example/deplib"
// ^^^^^^^^^^^^^^^^^^^^^^^^^ reference github.com/example/deplib 0.1.test `github.com/example/deplib`/

var Sentinel deplib.CustomErr
// ^^^^^^^^ definition 0.1.test `sg/pr258`/Sentinel.
// kind Variable
// display_name Sentinel
// signature_documentation
// > var Sentinel deplib.CustomErr
// ^^^^^^ reference github.com/example/deplib 0.1.test `github.com/example/deplib`/
// ^^^^^^^^^ reference github.com/example/deplib 0.1.test `github.com/example/deplib`/CustomErr#

//⌄ enclosing_range_start 0.1.test `sg/pr258`/New().
func New() deplib.CustomErr { return nil }
// ^^^ definition 0.1.test `sg/pr258`/New().
// kind Function
// display_name New
// signature_documentation
// > func New() deplib.CustomErr
// ^^^^^^ reference github.com/example/deplib 0.1.test `github.com/example/deplib`/
// ^^^^^^^^^ reference github.com/example/deplib 0.1.test `github.com/example/deplib`/CustomErr#
// ⌃ enclosing_range_end 0.1.test `sg/pr258`/New().

type Wrapper struct {
// ^^^^^^^ definition 0.1.test `sg/pr258`/Wrapper#
// kind Struct
// display_name Wrapper
// signature_documentation
// > type Wrapper struct{ Err deplib.CustomErr }
Err deplib.CustomErr
// ^^^ definition 0.1.test `sg/pr258`/Wrapper#Err.
// kind Field
// display_name Err
// signature_documentation
// > struct field Err deplib.CustomErr
// ^^^^^^ reference github.com/example/deplib 0.1.test `github.com/example/deplib`/
// ^^^^^^^^^ reference github.com/example/deplib 0.1.test `github.com/example/deplib`/CustomErr#
}

Loading