Commit 629c7c98 authored by Ian Lynagh's avatar Ian Lynagh

Add DoAndIfThenElse tests

parent 4db47d87
{-# LANGUAGE DoAndIfThenElse #-}
module DoAndIfThenElse where
foo :: IO ()
foo = do if True
then return ()
else return ()
......@@ -88,3 +88,4 @@ test('read_1821', normal, compile, [''])
test('T3303', extra_clean(['T3303A.hi', 'T3303A.o']),
multimod_compile, ['T3303', '-v0'])
test('T3741', normal, compile, [''])
test('DoAndIfThenElse', normal, compile, [''])
{-# LANGUAGE NoDoAndIfThenElse #-}
module NoDoAndIfThenElse where
foo :: IO ()
foo = do if True
then return ()
else return ()
NoDoAndIfThenElse.hs:7:13:
Unexpected semi-colons in conditional:
if True; then return (); else return ()
Perhaps you meant to use -XDoAndIfThenElse?
......@@ -65,3 +65,4 @@ test('T1344b', normal, compile_fail, [''])
test('T1344c', normal, compile_fail, [''])
test('T3811', normal, compile_fail, [''])
test('T3811b', normal, compile_fail, [''])
test('NoDoAndIfThenElse', normal, compile_fail, [''])
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