You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: this only happens if the Foo struct is in another package.
When I try to autocomplete this (e.g. gocode autocomplete main.go 81)
Expected:
I only get Bar because my cursor is inside the struct
2017/10/13 08:18:01 Number of candidates found: 1
2017/10/13 08:18:01 Candidates are:
2017/10/13 08:18:01 var Bar string
2017/10/13 08:18:01 =======================================================
Actual:
I get all "global" candidates:
2017/10/13 08:17:11 Number of candidates found: 43
2017/10/13 08:17:11 Candidates are:
2017/10/13 08:17:11 const false
2017/10/13 08:17:11 const iota
2017/10/13 08:17:11 const nil
2017/10/13 08:17:11 const true
2017/10/13 08:17:11 func append([]type, ...type) []type
2017/10/13 08:17:11 func cap(container) int
2017/10/13 08:17:11 func close(channel)
2017/10/13 08:17:11 func complex(real, imag) complex
2017/10/13 08:17:11 func copy(dst, src)
2017/10/13 08:17:11 func delete(map[typeA]typeB, typeA)
2017/10/13 08:17:11 func imag(complex)
2017/10/13 08:17:11 func len(container) int
2017/10/13 08:17:11 func main()
2017/10/13 08:17:11 func make(type, len[, cap]) type
2017/10/13 08:17:11 func new(type) *type
2017/10/13 08:17:11 func panic(interface{})
2017/10/13 08:17:11 func print(...interface{})
2017/10/13 08:17:11 func println(...interface{})
2017/10/13 08:17:11 func real(complex)
2017/10/13 08:17:11 func recover() interface{}
2017/10/13 08:17:11 package fmt
2017/10/13 08:17:11 package lib
2017/10/13 08:17:11 type bool built-in
2017/10/13 08:17:11 type byte built-in
2017/10/13 08:17:11 type complex128 built-in
2017/10/13 08:17:11 type complex64 built-in
2017/10/13 08:17:11 type error interface
2017/10/13 08:17:11 type float32 built-in
2017/10/13 08:17:11 type float64 built-in
2017/10/13 08:17:11 type int built-in
2017/10/13 08:17:11 type int16 built-in
2017/10/13 08:17:11 type int32 built-in
2017/10/13 08:17:11 type int64 built-in
2017/10/13 08:17:11 type int8 built-in
2017/10/13 08:17:11 type rune built-in
2017/10/13 08:17:11 type string built-in
2017/10/13 08:17:11 type uint built-in
2017/10/13 08:17:11 type uint16 built-in
2017/10/13 08:17:11 type uint32 built-in
2017/10/13 08:17:11 type uint64 built-in
2017/10/13 08:17:11 type uint8 built-in
2017/10/13 08:17:11 type uintptr built-in
2017/10/13 08:17:11 var tmp lib.Foo
2017/10/13 08:17:11 =======================================================
Problem:
Checking out the parent commit c7fddb3 returns the correct suggestions. So I assume that 1a78dd6 has introduced a bug.
Given that gocode is checked out with commit: 1a78dd6 (= current HEAD at the time of writing this)
And I have the following code
foo.go
contains:and
main.go
:where # is my cursor.
Note: this only happens if the
Foo
struct is in another package.When I try to autocomplete this (e.g.
gocode autocomplete main.go 81
)Expected:
I only get
Bar
because my cursor is inside the structActual:
I get all "global" candidates:
Problem:
Checking out the parent commit c7fddb3 returns the correct suggestions. So I assume that 1a78dd6 has introduced a bug.
(source: joefitzgerald/go-plus#598 (comment))
The text was updated successfully, but these errors were encountered: