Commit 494907f8 authored by Ben Gamari's avatar Ben Gamari 🐢

testsuite: Add test for #11076

parent 18312086
import Control.Exception
-- This should result in the "What" exception, not the undefined.
{-# NOINLINE f #-}
f :: Int -> Int -> IO Int
f x y | x>0 = throwIO (userError "What")
| y>0 = return 1
| otherwise = return 2
main = f 2 undefined >>= print
......@@ -14,3 +14,4 @@ test('T11076', normal, multimod_compile_and_run, ['T11076.hs', 'T11076_prim.cmm'
test('T11555a', normal, compile_and_run, [''])
test('T12368', exit_code(1), compile_and_run, [''])
test('T12368a', exit_code(1), compile_and_run, [''])
test('T13380', [expect_broken(13380), exit_code(1)], compile_and_run, [''])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment