diff options
author | Alfredo Di Napoli <alfredo@well-typed.com> | 2021-07-06 12:35:36 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-07-09 08:46:44 -0400 |
commit | 5193bd06c09009ebd2797a6674b458ec4b70248b (patch) | |
tree | 528b8a448b044e12233fed170cd7509733fa7b60 /testsuite | |
parent | f0a02dcc7517452246cd2f3f874b48d91bd68a68 (diff) | |
download | haskell-5193bd06c09009ebd2797a6674b458ec4b70248b.tar.gz |
Add TcRnIllegalWildCardsInRecord to TcRnMessage
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/parser/should_fail/RecordWildCardsFail.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/parser/should_fail/RecordWildCardsFail.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/parser/should_fail/all.T | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/parser/should_fail/RecordWildCardsFail.hs b/testsuite/tests/parser/should_fail/RecordWildCardsFail.hs new file mode 100644 index 0000000000..2639193815 --- /dev/null +++ b/testsuite/tests/parser/should_fail/RecordWildCardsFail.hs @@ -0,0 +1,7 @@ + +module RecordWildCardsFail where + +data Foo = Foo { a :: Int } + +foo :: Foo -> Int +foo Foo{..} = a diff --git a/testsuite/tests/parser/should_fail/RecordWildCardsFail.stderr b/testsuite/tests/parser/should_fail/RecordWildCardsFail.stderr new file mode 100644 index 0000000000..2f7958b45c --- /dev/null +++ b/testsuite/tests/parser/should_fail/RecordWildCardsFail.stderr @@ -0,0 +1,3 @@ +RecordWildCardsFail.hs:7:5: + Illegal `..' in record pattern + Suggested fix: Perhaps you intended to use RecordWildCards diff --git a/testsuite/tests/parser/should_fail/all.T b/testsuite/tests/parser/should_fail/all.T index 82cddd8ed8..7787826a4b 100644 --- a/testsuite/tests/parser/should_fail/all.T +++ b/testsuite/tests/parser/should_fail/all.T @@ -194,3 +194,4 @@ test('T19928', normal, compile_fail, ['']) test('T19923a', normal, compile_fail, ['']) test('T19923b', normal, compile_fail, ['']) test('T19923c', normal, compile_fail, ['']) +test('RecordWildCardsFail', normal, compile_fail, ['']) |