cmd/compile: internal compiler error with self-referential method in interface #6638
Related, but of simpler form: http://play.golang.org/p/peQWvRySw8 prog.go:6: type T has no method T.m prog.go:6: invalid expression unsafe.Sizeof(T.m) [process exited with non-zero status] (This package is accepted by gccgo and go/types).
gopherbot pushed a commit that referenced this issue
Oct 4, 2018
LookupFieldOrMethod needs to know if a method receiver is a pointer type. Until now this was computed from the the method signature's receiver, which required the method signature to be type-checked. Furthermore, it required the receiver to be set before the method signature was fully type-checked in some cases (see issue #6638). This CL remembers this property during object resolution, when we know it from the source. With this CL, method signatures don't need to be type-checked before they can be looked up; this is a first step towards separating type checking of types and type-checking of associated methods. Updates #23203. Updates #26854. Change-Id: Ie3eb7976e8fe8176ea1b284fa7471a4b7000f80b Reviewed-on: https://go-review.googlesource.com/c/139422 Run-TryBot: Robert Griesemer <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Alan Donovan <firstname.lastname@example.org>