testsuite: Add regression test for #13474
authorBen Gamari <ben@smart-cactus.org>
Sat, 1 Apr 2017 14:59:53 +0000 (10:59 -0400)
committerBen Gamari <ben@smart-cactus.org>
Sat, 1 Apr 2017 15:00:29 +0000 (11:00 -0400)
testsuite/tests/typecheck/should_compile/T13474.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_compile/all.T

diff --git a/testsuite/tests/typecheck/should_compile/T13474.hs b/testsuite/tests/typecheck/should_compile/T13474.hs
new file mode 100644 (file)
index 0000000..9775832
--- /dev/null
@@ -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
+
index 6bd98ca..c6674c9 100644 (file)
@@ -550,3 +550,4 @@ test('T13337', normal, compile, [''])
 test('T13343', normal, compile, [''])
 test('T13458', normal, compile, [''])
 test('T13490', normal, compile, [''])
+test('T13474', normal, compile, [''])