summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2012-07-20 12:56:53 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2012-07-20 12:57:10 +0100
commit2b5c6ba1711a3e22d902274b03d6014b1926d234 (patch)
tree50379722982f4d78e2e348626c8183633d613a72 /testsuite/tests/rename
parenta55605f18349cf18dabc496128bde4bb8df89fe7 (diff)
downloadhaskell-2b5c6ba1711a3e22d902274b03d6014b1926d234.tar.gz
Test Trac #7085
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r--testsuite/tests/rename/should_compile/T7085.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T7085.stderr3
-rw-r--r--testsuite/tests/rename/should_compile/all.T1
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T7085.hs b/testsuite/tests/rename/should_compile/T7085.hs
new file mode 100644
index 0000000000..4b587f4dc7
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T7085.hs
@@ -0,0 +1,8 @@
+{-# OPTIONS_GHC -fwarn-unused-binds #-}
+
+module ShouldFail where
+
+foo :: Int -> Int
+foo n = n + 1
+ where
+ Nothing = Just n
diff --git a/testsuite/tests/rename/should_compile/T7085.stderr b/testsuite/tests/rename/should_compile/T7085.stderr
new file mode 100644
index 0000000000..b642ed6a44
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T7085.stderr
@@ -0,0 +1,3 @@
+
+T7085.hs:8:6: Warning:
+ This pattern-binding binds no variables: Nothing = Just n
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 3c821f7e2b..1963150ec9 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -192,3 +192,4 @@ test('T5867',
test('T6027', normal, compile, [''])
test('T6120', normal, compile, [''])
test('T7007', normal, compile, [''])
+test('T7085', normal, compile, [''])