diff options
-rw-r--r-- | compiler/GHC/Parser.y | 2 | ||||
-rw-r--r-- | testsuite/tests/overloadedrecflds/should_compile/T20723.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/overloadedrecflds/should_compile/all.T | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/compiler/GHC/Parser.y b/compiler/GHC/Parser.y index 3575ee8eee..d499341c36 100644 --- a/compiler/GHC/Parser.y +++ b/compiler/GHC/Parser.y @@ -3720,7 +3720,7 @@ qvar :: { LocatedN RdrName } -- *after* we see the close paren. field :: { Located FastString } - : VARID { sL1 $1 $! getVARID $1 } + : varid { reLocN $ fmap (occNameFS . rdrNameOcc) $1 } qvarid :: { LocatedN RdrName } : varid { $1 } diff --git a/testsuite/tests/overloadedrecflds/should_compile/T20723.hs b/testsuite/tests/overloadedrecflds/should_compile/T20723.hs new file mode 100644 index 0000000000..06a5db988f --- /dev/null +++ b/testsuite/tests/overloadedrecflds/should_compile/T20723.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE OverloadedRecordDot #-} +module T20723 where + +data Rec = Rec { as :: Int, dependency :: Int, signature :: Int, javascript :: Int } + +res r = r.as + r.dependency + r.signature + r.javascript + + + diff --git a/testsuite/tests/overloadedrecflds/should_compile/all.T b/testsuite/tests/overloadedrecflds/should_compile/all.T index b52c43a655..863fbacca8 100644 --- a/testsuite/tests/overloadedrecflds/should_compile/all.T +++ b/testsuite/tests/overloadedrecflds/should_compile/all.T @@ -9,4 +9,5 @@ test('NFSImport', [extra_files(['NFSExport.hs'])], multimod_compile, ['NFSImport test('T18999_NoFieldSelectors', normal, compile, ['']) test('T18999_FieldSelectors', normal, compile, ['']) test('T19154', normal, compile, ['']) +test('T20723', normal, compile, ['']) |