Commit 808d4a1f authored by Ian Lynagh's avatar Ian Lynagh
Browse files

NondecreasingIndentation tests

parent 33d795c7
{-# LANGUAGE NondecreasingIndentation #-}
module ShouldCompile where
f :: IO ()
f = do if True then f else do
f
if True then f else do
f
...@@ -85,3 +85,4 @@ test('T3303', extra_clean(['T3303A.hi', 'T3303A.o']), ...@@ -85,3 +85,4 @@ test('T3303', extra_clean(['T3303A.hi', 'T3303A.o']),
multimod_compile, ['T3303', '-v0']) multimod_compile, ['T3303', '-v0'])
test('T3741', normal, compile, ['']) test('T3741', normal, compile, [''])
test('DoAndIfThenElse', normal, compile, ['']) test('DoAndIfThenElse', normal, compile, [''])
test('NondecreasingIndentation', normal, compile, [''])
{-# LANGUAGE NoNondecreasingIndentation #-}
module ShouldCompile where
f :: IO ()
f = do if True then f else do
f
if True then f else do
f
NondecreasingIndentationFail.hs:7:28: Empty 'do' construct
...@@ -71,3 +71,4 @@ test('T3811e', normal, compile_fail, ['']) ...@@ -71,3 +71,4 @@ test('T3811e', normal, compile_fail, [''])
test('T3811f', normal, compile_fail, ['']) test('T3811f', normal, compile_fail, [''])
test('T3811g', normal, compile_fail, ['']) test('T3811g', normal, compile_fail, [''])
test('NoDoAndIfThenElse', normal, compile_fail, ['']) test('NoDoAndIfThenElse', normal, compile_fail, [''])
test('NondecreasingIndentationFail', 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