You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
typeTestT[Tany] struct {
VT
}
func (TestT[T]) Hello1() {
fmt.Println("hello")
}
typeTestInt1TestT[int]
typeTestInt2TestT[int]
typeTestInt3=TestT[int]
funcTestGoType(t*testing.T) {
var (
v1TestInt1v2TestInt2v3TestInt3v4TestT[int]
)
v1.Hello1() // v1.Hello1 undefined (type TestInt1 has no field or method Hello1)v2.Hello1() // v2.Hello1 undefined (type TestInt2 has no field or method Hello1)v3.Hello1()
v4.Hello1()
v3=v4//v1 != v2
}
What did you expect to see?
Support call method.
What did you see instead?
undefined (type TestInt1 has no field or method Hello1)
The text was updated successfully, but these errors were encountered:
RelicOfTesla
changed the title
cmd/go: Generate type has no field or method on type redefine
cmd/go: Generate type has no method on type redefine
Sep 12, 2022
Like all type declarations, methods are cleared out.
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Support call method.
What did you see instead?
undefined (type TestInt1 has no field or method Hello1)
The text was updated successfully, but these errors were encountered: