summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2017-04-01 10:59:53 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-01 11:00:29 -0400
commit616a3b49f085c01ff676424a1c3297ce0888e7ae (patch)
treea35d02dcedebf8914a75ec49f1d5fd663a252f29
parenta094aa7dcf92ecb7ddbb82128e279d434f5835ba (diff)
downloadhaskell-616a3b49f085c01ff676424a1c3297ce0888e7ae.tar.gz
testsuite: Add regression test for #13474
-rw-r--r--testsuite/tests/typecheck/should_compile/T13474.hs13
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
2 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T13474.hs b/testsuite/tests/typecheck/should_compile/T13474.hs
new file mode 100644
index 0000000000..977583244b
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T13474.hs
@@ -0,0 +1,13 @@
+module T13474 where
+
+import qualified Data.Map as M
+
+class Default a where
+ def :: a
+
+foo :: Default a => b -> a
+foo x = def
+
+mapdef :: Default v => M.Map k v -> M.Map k v
+mapdef = M.map foo
+
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 6bd98ca8c9..c6674c9b60 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -550,3 +550,4 @@ test('T13337', normal, compile, [''])
test('T13343', normal, compile, [''])
test('T13458', normal, compile, [''])
test('T13490', normal, compile, [''])
+test('T13474', normal, compile, [''])