Skip to content

Invalid record update error: don't scope-check datacons

sheaf requested to merge sheaf/ghc:T26391 into master

Ticket: #26391 (closed).

This MR ensures that, when computing the set of minimal conflicting record fields to report an invalid record update, in GHC.Rename.Env.badFieldsUpd, we look up data constructors directly, not using the GlobalRdrEnv. This is to ensure the logic works even when the constructors are not in scope; what matters is only which record fields are in scope.

TODO:

  • Add test.
Edited by sheaf

Merge request reports

Loading