summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename
diff options
context:
space:
mode:
authorCarrieMY <carrie.xmy@gmail.com>2021-10-12 19:25:49 +0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-05 05:30:13 -0400
commitf0b920d1613db43925c01f02b0f550e29b11a86b (patch)
treee940dd971bc311117ba66d2f35426bd85efb9c66 /testsuite/tests/rename
parent086e288c6bb121581debd9308a8c2278f294e35a (diff)
downloadhaskell-f0b920d1613db43925c01f02b0f550e29b11a86b.tar.gz
Fix deferOutOfScopeVariables for qualified #20472
Diffstat (limited to 'testsuite/tests/rename')
-rw-r--r--testsuite/tests/rename/should_compile/T20472.hs8
-rw-r--r--testsuite/tests/rename/should_compile/T20472.stderr9
-rw-r--r--testsuite/tests/rename/should_compile/all.T1
3 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/T20472.hs b/testsuite/tests/rename/should_compile/T20472.hs
new file mode 100644
index 0000000000..6d4d2b4d24
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T20472.hs
@@ -0,0 +1,8 @@
+{-# OPTIONS_GHC -fdefer-out-of-scope-variables #-}
+
+module T20472 where
+
+a = nonexistent
+b = Prelude.nonexistent
+c = True
+d = Nonexistent.x
diff --git a/testsuite/tests/rename/should_compile/T20472.stderr b/testsuite/tests/rename/should_compile/T20472.stderr
new file mode 100644
index 0000000000..0b26c5b480
--- /dev/null
+++ b/testsuite/tests/rename/should_compile/T20472.stderr
@@ -0,0 +1,9 @@
+
+T20472.hs:5:5: warning: [-Wdeferred-out-of-scope-variables (in -Wdefault)]
+ Variable not in scope: nonexistent
+
+T20472.hs:6:5: warning: [-Wdeferred-out-of-scope-variables (in -Wdefault)]
+ Variable not in scope: nonexistent
+
+T20472.hs:8:5: warning: [-Wdeferred-out-of-scope-variables (in -Wdefault)]
+ Variable not in scope: x
diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T
index 5260145edd..2148470c66 100644
--- a/testsuite/tests/rename/should_compile/all.T
+++ b/testsuite/tests/rename/should_compile/all.T
@@ -176,3 +176,4 @@ 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'])
+test('T20472', normal, compile, [''])