diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/warnings/should_fail/WarningGroups.hs | 4 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_fail/WarningGroups.stderr | 9 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_fail/all.T | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/warnings/should_fail/WarningGroups.hs b/testsuite/tests/warnings/should_fail/WarningGroups.hs new file mode 100644 index 0000000000..9581895ff7 --- /dev/null +++ b/testsuite/tests/warnings/should_fail/WarningGroups.hs @@ -0,0 +1,4 @@ +{-# OPTIONS_GHC -Wwarn=everything -fwarn-all -fno-warn-compat -Werror=unused-binds #-} +module WarningGroups () where + +unused = let useless = () in () diff --git a/testsuite/tests/warnings/should_fail/WarningGroups.stderr b/testsuite/tests/warnings/should_fail/WarningGroups.stderr new file mode 100644 index 0000000000..8e9cedb07e --- /dev/null +++ b/testsuite/tests/warnings/should_fail/WarningGroups.stderr @@ -0,0 +1,9 @@ + +WarningGroups.hs:4:1: warning: [GHC-38417] [-Wmissing-signatures (in -Wall)] + Top-level binding with no type signature: unused :: () + +WarningGroups.hs:4:1: error: [-Wunused-top-binds (in -Wextra, -Wunused-binds), Werror=unused-top-binds] + Defined but not used: ‘unused’ + +WarningGroups.hs:4:14: error: [-Wunused-local-binds (in -Wextra, -Wunused-binds), Werror=unused-local-binds] + Defined but not used: ‘useless’ diff --git a/testsuite/tests/warnings/should_fail/all.T b/testsuite/tests/warnings/should_fail/all.T index 6eaf7af6fd..f016212ed9 100644 --- a/testsuite/tests/warnings/should_fail/all.T +++ b/testsuite/tests/warnings/should_fail/all.T @@ -10,6 +10,7 @@ def normalise_whitespace_carefully(s): test('WerrorFail', normal, compile_fail, ['']) test('WerrorFail2', normal, compile_fail, ['']) +test('WarningGroups', normal, compile_fail, ['']) test('CaretDiagnostics1', [normalise_whitespace_fun(normalise_whitespace_carefully)], compile_fail, |