summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-06-09 08:43:37 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-06-10 02:39:29 -0400
commitfb6b6379efcc07c6b5fd00368310f204f4a5f7bc (patch)
treeb9865c17500854c0799ba8401cbf4453c95d7cc9
parent8baa8874935daae7d2b7c6f5a1215a379b8b85db (diff)
downloadhaskell-fb6b6379efcc07c6b5fd00368310f204f4a5f7bc.tar.gz
Add (broken) test for #19966
-rw-r--r--testsuite/tests/rename/should_compile/T19966.hs7
-rw-r--r--testsuite/tests/rename/should_compile/all.T1
2 files changed, 8 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T19966.hs b/testsuite/tests/rename/should_compile/T19966.hs
new file mode 100644
index 0000000000..884b14d46e
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T19966.hs
@@ -0,0 +1,7 @@
+module T19966 where
+
+-- I is out of scope, so out-of-scope is a warning.
+x = I
+
+-- IO is out of scope, so out-of-scope should be a warning, but fails.
+y = IO
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 56521084d7..5260145edd 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -175,3 +175,4 @@ test('T18497', [], makefile_test, ['T18497'])
test('T18264', [], makefile_test, ['T18264'])
test('T18302', expect_broken(18302), compile, [''])
test('T17853', [], multimod_compile, ['T17853', '-v0'])
+test('T19966', expect_broken(19966), compile, ['-fdefer-out-of-scope-variables'])