go/types: fix interface receiver type for incremental type-checking
The type checker may be called incrementally (by repeatedly calling Checker.Files), for instance when adding _test.go files to a set of already checked files. The existing code reset a cache of (already computed) interface information with each Checker.Files call, causing interfaces to be recomputed in some cases, albeit with different receiver information (see comments in this CL for details). Don't reset the interface cache to avoid this problem. While adding a test case, also factor out some common testing logic. Fixes #29029. Change-Id: I2e2d6d6bb839b3a76522fbc4ba7355c71d3bb80b Reviewed-on: https://go-review.googlesource.com/c/152259Reviewed-by:Alan Donovan <adonovan@google.com>
Showing
Please register or sign in to comment