From 3fcf79a47138661bb01276a94e3b6d934ba92d4d Mon Sep 17 00:00:00 2001 From: Alec Theriault Date: Mon, 28 Jan 2019 22:11:08 -0800 Subject: 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. --- compiler/parser/Lexer.x | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/parser') 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 -- cgit v1.2.1