Lexer: turn some fatal errors into non-fatal ones
[ghc.git] / testsuite / tests / parser / should_fail / T16270.hs
1 {-# LANGUAGE NoTraditionalRecordSyntax, NoDoAndIfThenElse, NoMultiWayIf, NoLambdaCase, NoNumericUnderscores, MagicHash #-}
2 {-# OPTIONS -Werror=missing-space-after-bang #-}
3
4 module T16270 where
5
6 c = do
7 if c then
8 False
9 else
10 True
11
12 f = id do { 1 }
13 g = id \x -> x
14
15 data Num a => D a
16
17 data Pair a b = Pair { fst :: a, snd :: b }
18 t = p { fst = 1, snd = True }
19
20 z :: forall a. ()
21 z = if True; then (); else ();
22
23 data G a where
24
25 multiWayIf !i = (a, b)
26 where
27 a = if | i -> True
28 | otherwise -> False
29 b = if | i -> False
30 | otherwise -> True
31
32 w = \case _ : _ -> True
33 _ -> False
34
35 n = 123_456
36
37 s = "hello ωorld"# -- note the omega
38
39 -- a fatal error.
40 k = let
41
42 -- not reported, as the previous one was fatal.
43 k = let