Fix #14719 by using the setting the right SrcSpan
Currently, error messages that germane to GADT constructors put the source span at only the first character in the constructor, leading to insufficient caret diagnostics. This can be easily fixed by using a source span that spans the entire constructor, instead of just the first character. Test Plan: make test TEST=T14719 Reviewers: alanz, bgamari, simonpj Reviewed By: alanz, simonpj Subscribers: simonpj, goldfire, rwbarton, thomie, carter GHC Trac Issues: #14719 Differential Revision: https://phabricator.haskell.org/D4344 (cherry picked from commit 59fa7b32)
Showing
- compiler/typecheck/TcTyClsDecls.hs 2 additions, 2 deletionscompiler/typecheck/TcTyClsDecls.hs
- testsuite/tests/gadt/T14719.hs 8 additions, 0 deletionstestsuite/tests/gadt/T14719.hs
- testsuite/tests/gadt/T14719.stderr 18 additions, 0 deletionstestsuite/tests/gadt/T14719.stderr
- testsuite/tests/gadt/all.T 1 addition, 0 deletionstestsuite/tests/gadt/all.T
- testsuite/tests/polykinds/T9222.stderr 2 additions, 2 deletionstestsuite/tests/polykinds/T9222.stderr
Loading
Please register or sign in to comment