diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-11-24 10:52:56 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-11-26 16:02:23 -0500 |
commit | 02372be119bd1a4e7099d2c7d5bb3de096e99409 (patch) | |
tree | 6fe26c6bb54b56cd576f5dd43f3684ddefad0b7d /testsuite/tests/overloadedrecflds | |
parent | 7e18b3041321b19876e74b88ffed3b44e4665c23 (diff) | |
download | haskell-02372be119bd1a4e7099d2c7d5bb3de096e99409.tar.gz |
Allow keywords which can be used as variables to be used with OverloadedDotSyntax
There are quite a few keywords which are allowed to be used as
variables. Such as "as", "dependency" etc. These weren't accepted by
OverloadedDotSyntax.
The fix is pretty simple, use the varid production rather than raw
VARID.
Fixes #20723
Diffstat (limited to 'testsuite/tests/overloadedrecflds')
-rw-r--r-- | testsuite/tests/overloadedrecflds/should_compile/T20723.hs | 9 | ||||
-rw-r--r-- | testsuite/tests/overloadedrecflds/should_compile/all.T | 1 |
2 files changed, 10 insertions, 0 deletions
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, ['']) |