Skip to content

cmd/go2go: receiver parameter inference for embedded methods fails (not implemented) #39901

@lavalamp

Description

@lavalamp

What version of Go are you using (go version)?

dev.go2go branch @ 10ea225e28a9ca3a5b18dd4609bcc41a7c26e8dd

Does this issue reproduce with the latest release?

Yes

What did you do?

I ran this file:

package main

type base(type T) struct{}
func (b base(T)) A() {}

type foo struct {
        base (*foo)
}

type bar struct{
        base(foo)
}

func main() {
        x := &foo{}
        x.A()
        y := bar{}
        y.A()
}

What did you expect to see?

I expected at least one of x or y to have an A() method from embedding.

What did you see instead?

type checking failed for main
/tmp/go2go-run938616244/embedding2.go2:16:4: x.A undefined (type *foo has no field or method A)
/tmp/go2go-run938616244/embedding2.go2:18:4: y.A undefined (type bar has no field or method A)

(thanks for the quick fix for #39881!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions