summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_compile/T3640.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rename/should_compile/T3640.hs')
-rw-r--r--testsuite/tests/rename/should_compile/T3640.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T3640.hs b/testsuite/tests/rename/should_compile/T3640.hs
new file mode 100644
index 0000000000..2f8c2253ab
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T3640.hs
@@ -0,0 +1,11 @@
+{-# LANGUAGE NamedFieldPuns #-}
+
+module T3640 where
+
+data Record = Record { f1, f2, f3 :: Int }
+
+goodPun Record{f1,f2,f3} = f1 + f2 + f3
+
+badPun r = f1 + f2 + f3
+ where Record{f1=f1,f2,f3} = r
+