Skip to content

Gocode misunderstands method expressions #18

Open
@nsf

Description

@nsf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions