Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Clarify error message when function is not an interface definition
Browse files Browse the repository at this point in the history
helps #307
  • Loading branch information
nicksnyder authored Sep 20, 2018
1 parent 6b10366 commit 4d10da0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion langserver/implementation.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func implements(fset *token.FileSet, lprog *loader.Program, pkgInfo *loader.Pack
if obj, ok := pkgInfo.ObjectOf(id).(*types.Func); ok {
recv := obj.Type().(*types.Signature).Recv()
if recv == nil {
return nil, errors.New("this function is not a method")
return nil, errors.New("this function is not an interface definition")
}
method = obj
T = recv.Type()
Expand Down

0 comments on commit 4d10da0

Please sign in to comment.