add test for #3049
authorSimon Marlow <marlowsd@gmail.com>
Wed, 24 Jun 2009 14:15:07 +0000 (14:15 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 24 Jun 2009 14:15:07 +0000 (14:15 +0000)
tests/3049.hs [new file with mode: 0644]
tests/3049.stdout [new file with mode: 0644]
tests/all.T

diff --git a/tests/3049.hs b/tests/3049.hs
new file mode 100644 (file)
index 0000000..1894562
--- /dev/null
@@ -0,0 +1,8 @@
+import Control.Concurrent.STM
+
+main = do
+  x <- atomically $ do
+    v <- newTVar 0
+    always $ return True -- remove this line and all is fine
+    return v
+  atomically (readTVar x) >>= print
diff --git a/tests/3049.stdout b/tests/3049.stdout
new file mode 100644 (file)
index 0000000..573541a
--- /dev/null
@@ -0,0 +1 @@
+0
index 830bfb5..be5019b 100644 (file)
@@ -33,3 +33,4 @@ test('conc061', normal, compile_and_run, ['-package stm'])
 test('conc062', normal, compile_and_run, ['-package stm'])
 test('conc063', skip_if_fast, compile_and_run, ['-package stm'])
 test('2411', ignore_output, compile_and_run, ['-package stm'])
+test('3049', normal, compile_and_run, ['-package stm'])