[commit: ghc] master: Better error message for empty character literal, for Trac #13450. (cac8be6)

git at git.haskell.org git at git.haskell.org
Thu Apr 19 19:25:50 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/cac8be611e7e80ed80e24b15faac9e1ac0a07247/ghc

>---------------------------------------------------------------

commit cac8be611e7e80ed80e24b15faac9e1ac0a07247
Author: HE, Tao <sighingnow at gmail.com>
Date:   Thu Apr 19 12:31:09 2018 -0400

    Better error message for empty character literal, for Trac #13450.
    
    For empty character literal, the `''`, report error message properly
    rather than just throw a "parser error" with wrong error location.
    
    Test Plan: make test TEST="T13450 T13450TH"
    
    Reviewers: goldfire, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie, mpickering, carter
    
    GHC Trac Issues: #13450
    
    Differential Revision: https://phabricator.haskell.org/D4594


>---------------------------------------------------------------

cac8be611e7e80ed80e24b15faac9e1ac0a07247
 compiler/parser/Parser.y                           | 58 ++++++++++++++++++----
 testsuite/tests/parser/should_fail/T13450.hs       |  4 ++
 testsuite/tests/parser/should_fail/T13450.stderr   |  4 ++
 testsuite/tests/parser/should_fail/T13450TH.hs     |  6 +++
 testsuite/tests/parser/should_fail/T13450TH.stderr |  6 +++
 testsuite/tests/parser/should_fail/all.T           |  2 +
 6 files changed, 70 insertions(+), 10 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc cac8be611e7e80ed80e24b15faac9e1ac0a07247


More information about the ghc-commits mailing list