Closed thanm closed 5 years ago
Change https://golang.org/cl/187057 mentions this issue: test: new testcase for gccgo compiler failure
Change https://golang.org/cl/187058 mentions this issue: compiler: follow-on fix for finalizing imported methods
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
What did you do?
This bug is a sibling of issue 33013; the failure mode is very similar, but because of the way the type in question is being imported, the fix for 33013 is not effective.
To reproduce, compile these three packages:
Package "a":
Package "b":
Package "c":
What did you expect to see?
Passing compilation
What did you see instead?
Compiler hits this assert:
The fix for issue 33013 added a cleanup pass after Import::read_types() that went through the vector of newly imported types looking for interface types -- this works if the type in question is imported eagerly, but doesn't work if the type is only mentioned in a function that gets imported later on.