diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-05-04 23:28:07 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-06 02:32:06 -0400 |
commit | 1635d5c229a3ea0bc8e0ee862948cda2c435221a (patch) | |
tree | 2df9ba0706c27370bff879006c5aca4bc241946e /testsuite/tests/printer | |
parent | 418295eab741fd420c6f350141c332ef26f9f0a4 (diff) | |
download | haskell-1635d5c229a3ea0bc8e0ee862948cda2c435221a.tar.gz |
EPA: properly capture semicolons between Matches in a FunBind
For the source
module MatchSemis where
{
a 0 = 1;
a _ = 2;
}
Make sure that the AddSemiAnn entries for the two trailing semicolons
are attached to the component Match elements.
Closes #19784
Diffstat (limited to 'testsuite/tests/printer')
-rw-r--r-- | testsuite/tests/printer/Makefile | 5 | ||||
-rw-r--r-- | testsuite/tests/printer/Test19784.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/printer/all.T | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/printer/Makefile b/testsuite/tests/printer/Makefile index 6be7545752..3bd736b7a8 100644 --- a/testsuite/tests/printer/Makefile +++ b/testsuite/tests/printer/Makefile @@ -557,3 +557,8 @@ CommentsTest: InTreeAnnotations1: $(CHECK_PPR) $(LIBDIR) InTreeAnnotations1.hs $(CHECK_EXACT) $(LIBDIR) InTreeAnnotations1.hs + +.PHONY: Test19784 +Test19784: + $(CHECK_PPR) $(LIBDIR) Test19784.hs + $(CHECK_EXACT) $(LIBDIR) Test19784.hs diff --git a/testsuite/tests/printer/Test19784.hs b/testsuite/tests/printer/Test19784.hs new file mode 100644 index 0000000000..b424c2cc6b --- /dev/null +++ b/testsuite/tests/printer/Test19784.hs @@ -0,0 +1,5 @@ +module Test19784 where +{ +a 0 = 1; +a _ = 2; +} diff --git a/testsuite/tests/printer/all.T b/testsuite/tests/printer/all.T index 5c0e3fbdfa..04d6d33acc 100644 --- a/testsuite/tests/printer/all.T +++ b/testsuite/tests/printer/all.T @@ -123,3 +123,5 @@ test('PprRecordDotSyntax4', ignore_stderr, makefile_test, ['PprRecordDotSyntax4' test('PprRecordDotSyntaxA', ignore_stderr, makefile_test, ['PprRecordDotSyntaxA']) test('CommentsTest', ignore_stderr, makefile_test, ['CommentsTest']) test('InTreeAnnotations1', ignore_stderr, makefile_test, ['InTreeAnnotations1']) + +test('Test19784', ignore_stderr, makefile_test, ['Test19784'])
\ No newline at end of file |