Use lookupOccRn_maybe in TH.lookupName
When looking up a value, we want to be able to find both variables and record fields. So we should not use the lookupSameOccRn_maybe function, as we can't know ahead of time which record field namespace a record field with the given textual name will belong to. Fixes #24293
Showing
- compiler/GHC/Tc/Gen/Splice.hs 8 additions, 2 deletionscompiler/GHC/Tc/Gen/Splice.hs
- testsuite/tests/overloadedrecflds/should_compile/T24293.hs 9 additions, 0 deletionstestsuite/tests/overloadedrecflds/should_compile/T24293.hs
- testsuite/tests/overloadedrecflds/should_compile/T24293b.hs 13 additions, 0 deletionstestsuite/tests/overloadedrecflds/should_compile/T24293b.hs
- testsuite/tests/overloadedrecflds/should_compile/T24293c.hs 11 additions, 0 deletionstestsuite/tests/overloadedrecflds/should_compile/T24293c.hs
- testsuite/tests/overloadedrecflds/should_compile/T24293c.stderr 11 additions, 0 deletions...ite/tests/overloadedrecflds/should_compile/T24293c.stderr
- testsuite/tests/overloadedrecflds/should_compile/all.T 3 additions, 0 deletionstestsuite/tests/overloadedrecflds/should_compile/all.T
Loading
Please register or sign in to comment