summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_compile/T3901.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rename/should_compile/T3901.hs')
-rw-r--r--testsuite/tests/rename/should_compile/T3901.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T3901.hs b/testsuite/tests/rename/should_compile/T3901.hs
new file mode 100644
index 0000000000..39b521977b
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3901.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE RecordWildCards, TransformListComp, NamedFieldPuns #-}
+
+module T3901 where
+
+data Rec = Rec {a :: Int} deriving (Show)
+
+recs1 = [a | Rec {a=a} <- [Rec 1], then group by a]
+
+recs2 = [a | Rec {a} <- [Rec 1], then group by a]
+
+recs3 = [a | Rec {..} <- [Rec 1], then group by a]
+
+recs4 :: [[Int]]
+recs4 = [a | Rec {..} <- [Rec 1], then group by a]