Closed guns closed 7 years ago
According to https://golang.org/ref/spec#Function_types, a function can declare its return types as a list of parameters. The following function, therefore, is valid:
func f() (a, b io.Reader, c error) { return }
Gocode, however, incorrectly determines that the second return type from f is error, not io.Reader, as demonstrated by the following:
f
error
io.Reader
package main func f() (a, b io.Reader, c error) { return } func main() { a, b, c := f() b. }
With the above saved as issue.go:
issue.go
$ gocode -in ./issue.go autocomplete 94 Found 1 candidates: func Error() string
Thank you for gocode!
gocode
Thanks for reporting it.
According to https://golang.org/ref/spec#Function_types, a function can declare its return types as a list of parameters. The following function, therefore, is valid:
Gocode, however, incorrectly determines that the second return type from
f
iserror
, notio.Reader
, as demonstrated by the following:With the above saved as
issue.go
:Thank you for
gocode
!