Use correct source spans for EmptyCase
Summary: The parser's calculation of source spans for `EmptyCase` expressions was a bit off, leading to some wonky-looking error messages. Easily fixed with some uses of `comb3` and `sLL`. Test Plan: make test TEST=T15139 Reviewers: bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, mpickering, carter GHC Trac Issues: #15139 Differential Revision: https://phabricator.haskell.org/D4685
Showing
- compiler/parser/Parser.y 3 additions, 2 deletionscompiler/parser/Parser.y
- testsuite/tests/parser/should_compile/T15139.hs 13 additions, 0 deletionstestsuite/tests/parser/should_compile/T15139.hs
- testsuite/tests/parser/should_compile/T15139.stderr 21 additions, 0 deletionstestsuite/tests/parser/should_compile/T15139.stderr
- testsuite/tests/parser/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/parser/should_compile/all.T
Please register or sign in to comment