Skip to content

tyThingLocalGREs: include all DataCons for RecFlds

sheaf requested to merge sheaf/ghc:T23546 into master

The GREInfo for a record field should include the collection of all the data constructors of the parent TyCon that have this record field. This information was being incorrectly computed in the tyThingLocalGREs function for a DataCon, as we were not taking into account other DataCons with the same parent TyCon.

I don't have a test case; it seems a bit tricky to trigger given that this logic is only used in ghci, and in general we end up going through the TyCon case to bring the record fields in scope, not the DataCon case.

Merge request reports