Skip to content

Turn "ambiguous import" error into a panic

sheaf requested to merge sheaf/ghc:T23302 into master

The "ambiguous import" error should never occur, as a lookup of a type or data constructor should never be ambiguous.
This is because a single module cannot export multiple Names with the same OccName, as per item (1) of Note [Exporting duplicate declarations] in GHC.Tc.Gen.Export.

This code path was intended to handle duplicate record fields, but the rest of the code had since been refactored to handle those in a different way.

TODO:

  • Rebase on top of !10336 (closed).
  • Remove the AmbiguousImport error message constructor.
Edited by sheaf

Merge request reports