-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Closed
Copy link
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
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
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.