diff options
author | Alec Theriault <alec.theriault@gmail.com> | 2019-01-28 22:11:08 -0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-02-10 02:39:06 -0500 |
commit | 3fcf79a47138661bb01276a94e3b6d934ba92d4d (patch) | |
tree | d2c771adc0257cedde422f4e7efe6c18f15f5bd9 /compiler/parser | |
parent | 249b0babb08409311a56da0ef890445676927fb7 (diff) | |
download | haskell-3fcf79a47138661bb01276a94e3b6d934ba92d4d.tar.gz |
Fix inverted position pragma flag in parser API
The behviour of `lexTokenStream` around position pragma was
accidentally inverted in 469fe6133646df5568c9486de2202124cb734242.
This fixes that bug.
This also unbreaks #16239.
Diffstat (limited to 'compiler/parser')
-rw-r--r-- | compiler/parser/Lexer.x | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 8219390e7e..1e27158b80 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -2900,7 +2900,7 @@ lexTokenStream :: StringBuffer -> RealSrcLoc -> DynFlags -> ParseResult [Located lexTokenStream buf loc dflags = unP go initState{ options = opts' } where dflags' = gopt_set (gopt_unset dflags Opt_Haddock) Opt_KeepRawTokenStream initState@PState{ options = opts } = mkPState dflags' buf loc - opts' = opts{ pExtsBitmap = xbit UsePosPragsBit .|. pExtsBitmap opts } + opts' = opts{ pExtsBitmap = complement (xbit UsePosPragsBit) .&. pExtsBitmap opts } go = do ltok <- lexer False return case ltok of |