gocode
gocode copied to clipboard
Gocode misunderstands method expressions
http://golang.org/doc/go_spec.html#Method_expressions
Example: package main
import (
"fmt"
)
type Int int
func (i Int) String() string {
return fmt.Sprint(int(i))
}
func main() {
f := Int.String
// here gocode thinks that 'f' is: 'func() string'
// but in reality it is: 'func(i Int) string'
}
Even though method expressions are rarely used, I need to fix that too.
It seems this issue is solved already?
No. No one worked on it. In fact given current gocode architecture it's a very hard problem to solve. At least that's how I remember it.