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

"Invalid type" hint for Go built-ins #142

Open
inliquid opened this issue Mar 9, 2019 · 1 comment
Open

"Invalid type" hint for Go built-ins #142

inliquid opened this issue Mar 9, 2019 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@inliquid
Copy link

inliquid commented Mar 9, 2019

This is shown for cap, len, and copy built-ins.
изображение

@mbana
Copy link
Contributor

mbana commented Mar 15, 2019

The problem is because is the call s = types.ObjectString(o, qf) is assigning s the value "func len(v Type) invalid type" in this line https://github.com/saibing/bingo/blob/master/langserver/hover.go#L151

You argue that you won't fix this because there is nothing we can do with types.ObjectString (in package go/types) returning invalid type but maybe we could do better...

We could do something similar to https://github.com/saibing/bingo/blob/master/langserver/definition.go#L122 because jumping to the definition of len works, i.e., I get taken to the defintion of len in /usr/local/go/src/builtin/builtin.go.

@saibing saibing self-assigned this Apr 1, 2019
@saibing saibing added bug Something isn't working help wanted Extra attention is needed labels Apr 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants