summaryrefslogtreecommitdiff
path: root/testsuite/tests/mdo/should_fail/mdofail003.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/mdo/should_fail/mdofail003.hs')
-rw-r--r--testsuite/tests/mdo/should_fail/mdofail003.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/mdo/should_fail/mdofail003.hs b/testsuite/tests/mdo/should_fail/mdofail003.hs
new file mode 100644
index 0000000000..ba7e80a74b
--- /dev/null
+++ b/testsuite/tests/mdo/should_fail/mdofail003.hs
@@ -0,0 +1,15 @@
+{-# OPTIONS -XRecursiveDo #-}
+
+-- shadowing is not allowed II
+
+module Main (main) where
+
+import Control.Monad.Fix
+
+t :: IO ()
+t = mdo x <- return 1
+ let x 0 = 4
+ return ()
+
+main :: IO ()
+main = t