Don't report used duplicate record fields as unused
Ticket: #24035 (closed)
This MR fixes the bug reported in #24035 (closed) in which the import of a duplicate record field could be erroneously reported as unused.
The issue is that an import of the form import M (fld)
can import
several different Name
s, and we should only report an error if ALL
of those Name
s are unused, not if ANY are.
Note [Reporting unused imported duplicate record fields] in GHC.Rename.Names explains the solution to this problem.