diff options
author | Carrie Xu <carrie.xmy@gmail.com> | 2021-10-09 20:54:30 +0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-12 01:41:41 -0400 |
commit | 58223dfacc709b6c2130b8fad466f0939d9a1043 (patch) | |
tree | 3e2c334e810f14fc8c56754a377189c9a76f46c8 /testsuite/tests/rename | |
parent | 2c06720e45efaf4d3a8e957f3ea7613d1ea311a8 (diff) | |
download | haskell-58223dfacc709b6c2130b8fad466f0939d9a1043.tar.gz |
Add Hint to "Empty 'do' block" Error Message#20147
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r-- | testsuite/tests/rename/should_fail/T20147.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/T20147.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/rename/should_fail/all.T | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/T20147.hs b/testsuite/tests/rename/should_fail/T20147.hs new file mode 100644 index 0000000000..b44717617c --- /dev/null +++ b/testsuite/tests/rename/should_fail/T20147.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE NoNondecreasingIndentation #-} +module T20147 where + +main = do + print "doing things with X" + withFile "test" $ \h -> do + readFile h diff --git a/testsuite/tests/rename/should_fail/T20147.stderr b/testsuite/tests/rename/should_fail/T20147.stderr new file mode 100644 index 0000000000..c70d3d0a8e --- /dev/null +++ b/testsuite/tests/rename/should_fail/T20147.stderr @@ -0,0 +1,4 @@ + +T20147.hs:6:28: error: + Empty 'do' block + Suggested fix: Perhaps you intended to use NondecreasingIndentation diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 6c2f0134a0..aec42ad733 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -179,3 +179,4 @@ test('T19843l', normal, compile_fail, ['']) test('T19843m', normal, compile_fail, ['']) test('T11167_ambig', normal, compile_fail, ['']) test('T18138', normal, compile_fail, ['']) +test('T20147', normal, compile_fail, [''])
\ No newline at end of file |