diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2021-08-22 21:14:46 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-06 22:57:55 -0400 |
commit | 407d3b3a3a219dab56d0a36598c637aa45da61e1 (patch) | |
tree | 4e03381c68302e2a995c573b4b57a4250f12dbf5 /testsuite/tests/ghc-api | |
parent | 5b41353355022c1247e0516d541b7f7fb49f0e29 (diff) | |
download | haskell-407d3b3a3a219dab56d0a36598c637aa45da61e1.tar.gz |
EPA: order of semicolons and comments for top-level decls is wrong
A comment followed by a semicolon at the top level resulted in the
preceding comments being attached to the following declaration.
Capture the comments as belonging to the declaration preceding the
semicolon instead.
Closes #20258
Diffstat (limited to 'testsuite/tests/ghc-api')
-rw-r--r-- | testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs b/testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs index 2bbbcf5b37..5e134b5234 100644 --- a/testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs +++ b/testsuite/tests/ghc-api/exactprint/AddDecl2.expected.hs @@ -8,6 +8,6 @@ foo a b = a + b -- | Do bar bar x y = {- baz -} foo (x+y) x -nn = n2 - -- end of file + +nn = n2 diff --git a/testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs b/testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs index e7c71dbd08..9a36673062 100644 --- a/testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs +++ b/testsuite/tests/ghc-api/exactprint/RmDecl4.expected.hs @@ -7,4 +7,5 @@ ff y = y + zz + xx zz = 1 + -- EOF |