summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/warnings/should_compile/DodgyExports01.hs4
-rw-r--r--testsuite/tests/warnings/should_compile/DodgyExports01.stderr5
-rw-r--r--testsuite/tests/warnings/should_compile/all.T1
3 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/warnings/should_compile/DodgyExports01.hs b/testsuite/tests/warnings/should_compile/DodgyExports01.hs
new file mode 100644
index 0000000000..66c6c3d3ab
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/DodgyExports01.hs
@@ -0,0 +1,4 @@
+{-# OPTIONS_GHC -fwarn-dodgy-exports #-}
+module Foo (T(..)) where
+
+type T = Int
diff --git a/testsuite/tests/warnings/should_compile/DodgyExports01.stderr b/testsuite/tests/warnings/should_compile/DodgyExports01.stderr
new file mode 100644
index 0000000000..8e9c00d8b8
--- /dev/null
+++ b/testsuite/tests/warnings/should_compile/DodgyExports01.stderr
@@ -0,0 +1,5 @@
+
+DodgyExports01.hs:2:13: warning: [-Wdodgy-exports (in -Wextra)]
+ The export item ‘T(..)’ suggests that
+ ‘T’ has (in-scope) constructors or class methods,
+ but it has none
diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T
index 1201a10f19..a2b82c9661 100644
--- a/testsuite/tests/warnings/should_compile/all.T
+++ b/testsuite/tests/warnings/should_compile/all.T
@@ -46,3 +46,4 @@ test('T19564d', normal, compile, [''])
# When warning about redundant constraints, test only Function context is highlighted by caret diagnostics
# Also, suppress uniques as one of the warnings is unstable in CI, otherwise.
test('T19296', normal, compile, ['-fdiagnostics-show-caret -Wredundant-constraints -dsuppress-uniques'])
+test('DodgyExports01', normal, compile, ['-Wdodgy-exports'])