types.cc
329 KB
-
compiler: compare parse methods when indexing interface types for export · 599b9f72
This change fixes a bug in which two interface types were being incorrectly commoned (considered identical) in the initial stages of writing out types to export data. The indexer does a walk to collect candidates for export, inserting types into a table to eliminate duplicates; as part of this process a local interface type T1 was being commoned with a different interface type T2. This caused a cycle in the exported type graph due to the way embedded interfaces are handled. The fix was to add a new flag to the Type::is_identical utility routine to request that interface type comparison be done by examining the original parse methods, as opposed to the expanded method set, then use the new flag when creating the hash map for the exporter. Fixes golang/go#30659. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/166638 From-SVN: r269634
Ian Lance Taylor committed