plugin: type switches fail with reflect-created types #24399
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
cmd/compile generates type hashes using MD5, but package reflect uses FNV-1 when dynamically constructing anonymous types. This causes type switches (which first search on type hash) to misbehave when using package plugin:
Notably, the failure goes away if the array type is constructed after the plugin.Open call, or if there's an explicit
*[8675309]int
type in x.go./cc @ianlancetaylor @mwhudson @crawshaw
The text was updated successfully, but these errors were encountered: