Fix -Woperator-whitespace for consym (part of #19372)
Due to an oversight, the initial specification and implementation of -Woperator-whitespace focused on varsym exclusively and completely ignored consym. This meant that expressions such as "x+ y" would produce a warning, while "x:+ y" would not. The specification was corrected in ghc-proposals pull request #404, and this patch updates the implementation accordingly. Regression test included.
Showing
- compiler/GHC/Parser/Lexer.x 29 additions, 16 deletionscompiler/GHC/Parser/Lexer.x
- docs/users_guide/9.6.1-notes.rst 3 additions, 0 deletionsdocs/users_guide/9.6.1-notes.rst
- testsuite/tests/parser/should_compile/T19372consym.hs 15 additions, 0 deletionstestsuite/tests/parser/should_compile/T19372consym.hs
- testsuite/tests/parser/should_compile/T19372consym.stderr 15 additions, 0 deletionstestsuite/tests/parser/should_compile/T19372consym.stderr
- testsuite/tests/parser/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/parser/should_compile/all.T
Loading
Please register or sign in to comment