Merge pull request #16304 from lydia-duncan/betterLineno
Track places where a symbol was reexported for better error message on conflict
[reviewed by @e-kayrakli]
Prior to this change, when a symbol that was re-exported conflicts with another
symbol, we would report the line number as where the symbol was defined.
However, re-exporting brings symbols to a closer distance, and thus we really
should report the line number of the re-export as it is the distance we care
I debated about only tracking this information based on a boolean flag but
backed away from that due to uncertainty about when to pass that flag during
the course of lookupPublicUnqualAccessSyms (the two argument version). Other
calls were set up so that we would only go into printConflictingSymbols when
there was a potential conflict (though I was also uncertain if that would have a
positive impact). Basically, my concern was that the time we would lose if we
call lookup twice because of functions that had the same name (and thus weren’t
actually a problem) was greater than what we would save in the case of
nonconflicting calls. But I can still look into that impact, I just probably
would need a different approach.
Updates four tests for the new error message.
Passed a full standard paratest with futures