[GHC] #14892: Field imposters with DuplicateRecordFields and NamedFieldPuns.
GHC
ghc-devs at haskell.org
Mon Mar 5 21:46:26 UTC 2018
#14892: Field imposters with DuplicateRecordFields and NamedFieldPuns.
-------------------------------------+-------------------------------------
Reporter: philderbeast | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.4.1-alpha3
Resolution: | Keywords: ORF
Operating System: MacOS X | Architecture: x86_64
Type of failure: GHC accepts | (amd64)
invalid program | Test Case:
Blocked By: | Blocking:
Related Tickets: #13644 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by adamgundry):
I think you want `DisambiguateRecordFields`. Without it, the 8.4 behaviour
is correct, isn't it? Indeed `G.X` does not have a field `x` in scope
(although it does have `G.x`). The error message could be better, perhaps
suggesting `DisambiguateRecordFields`.
Note that `DuplicateRecordFields` implies `DisambiguateRecordFields`,
which is why enabling the former fixes the problem.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14892#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list