summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-08-06 21:09:56 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-08-11 22:18:03 -0400
commit0ac8c0a551619b52e0f151d6781b11dd66cf2110 (patch)
tree03fc72fa642520ead136eb8a431255559ebe3c67
parentab4d15898c03a5db6741feb2028488facf032fa4 (diff)
downloadhaskell-0ac8c0a551619b52e0f151d6781b11dd66cf2110.tar.gz
testsuite: Add test for #18118
-rw-r--r--testsuite/tests/typecheck/should_compile/T18118.hs5
-rw-r--r--testsuite/tests/typecheck/should_compile/T18118A.hs5
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T1
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T18118.hs b/testsuite/tests/typecheck/should_compile/T18118.hs
new file mode 100644
index 0000000000..10a702d416
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T18118.hs
@@ -0,0 +1,5 @@
+module T18118 (myfun) where
+
+import T18118A
+
+{-# SPECIALISE myfun :: Double #-}
diff --git a/testsuite/tests/typecheck/should_compile/T18118A.hs b/testsuite/tests/typecheck/should_compile/T18118A.hs
new file mode 100644
index 0000000000..7a0b70def4
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T18118A.hs
@@ -0,0 +1,5 @@
+module T18118A where
+
+myfun :: a
+myfun = undefined
+
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 51977768c7..0ef2d9ef34 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -717,5 +717,6 @@ test('T17775-viewpats-a', normal, compile, [''])
test('T17775-viewpats-b', normal, compile_fail, [''])
test('T17775-viewpats-c', normal, compile_fail, [''])
test('T17775-viewpats-d', normal, compile_fail, [''])
+test('T18118', normal, multimod_compile, ['T18118', '-v0'])
test('T18412', normal, compile, [''])
test('T18470', normal, compile, [''])