summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/exactprint/all.T
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2022-12-29 22:12:27 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-01-05 10:49:09 -0500
commit22bb89989fc0a907ef6b8f6ae99aa8907f67e438 (patch)
tree017ae9669e6ab88c329028514faa3e94fd78509c /testsuite/tests/ghc-api/exactprint/all.T
parent541aedcd9023445b8e914d595ae8dcf2e799d618 (diff)
downloadhaskell-22bb89989fc0a907ef6b8f6ae99aa8907f67e438.tar.gz
EPA: Do not collect comments from end of file
In Parser.y semis1 production triggers for the virtual semi at the end of the file. This is detected by it being zero length. In this case, do not extend the span being used to gather comments, so any final comments are allocated at the module level instead.
Diffstat (limited to 'testsuite/tests/ghc-api/exactprint/all.T')
-rw-r--r--testsuite/tests/ghc-api/exactprint/all.T1
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-api/exactprint/all.T b/testsuite/tests/ghc-api/exactprint/all.T
index 97d94b566c..825d57c339 100644
--- a/testsuite/tests/ghc-api/exactprint/all.T
+++ b/testsuite/tests/ghc-api/exactprint/all.T
@@ -37,3 +37,4 @@ test('RmTypeSig2', ignore_stderr, makefile_test, ['RmTypeSig2'])
test('AddHiding1', ignore_stderr, makefile_test, ['AddHiding1'])
test('AddHiding2', ignore_stderr, makefile_test, ['AddHiding2'])
test('Test20239', normal, compile_fail, ['-dsuppress-uniques -ddump-parsed-ast -dkeep-comments'])
+test('ZeroWidthSemi', normal, compile, ['-dsuppress-uniques -ddump-parsed-ast -dkeep-comments'])