Skip to content

Commit 7c45fee

Browse files
committed
gopls/internal/golang: add missing err check
Fixes golang/go#74056 Change-Id: I605539185379384bb4f9a034bd0e66fab3e82ffb Reviewed-on: https://go-review.googlesource.com/c/tools/+/680296 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
1 parent 78473fc commit 7c45fee

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gopls/internal/golang/hover.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,10 @@ func findRhsTypeDecl(ctx context.Context, snapshot *cache.Snapshot, pkg *cache.P
153153
switch o := t.(type) {
154154
case *types.Named:
155155
obj = o.Obj()
156-
declPGF1, declPos1, _ := parseFull(ctx, snapshot, pkg.FileSet(), obj.Pos())
156+
declPGF1, declPos1, err := parseFull(ctx, snapshot, pkg.FileSet(), obj.Pos())
157+
if err != nil {
158+
return "", err
159+
}
157160
realTypeDecl, _, err := typeDeclContent(declPGF1, declPos1, obj)
158161
return realTypeDecl, err
159162
}

0 commit comments

Comments
 (0)